Workarounds for compiling with -D_FORTIFY_SOURCE=2 (as Ubuntu does), which
[u/mdw/putty] / pscp.c
diff --git a/pscp.c b/pscp.c
index ab3077b..451bdb0 100644 (file)
--- a/pscp.c
+++ b/pscp.c
@@ -178,7 +178,8 @@ int from_backend(void *frontend, int is_stderr, const char *data, int datalen)
      */
     if (is_stderr) {
        if (len > 0)
-           fwrite(data, 1, len, stderr);
+           if (fwrite(data, 1, len, stderr) < len)
+               /* oh well */;
        return 0;
     }