about summary refs log tree commit
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index 2f07e6d..55ba735 100644
--- a/cgit.c
+++ b/cgit.c
@@ -667,7 +667,7 @@ static inline void authenticate_post(void)
                 len = MAX_AUTHENTICATION_POST_BYTES;
         if ((len = read(STDIN_FILENO, buffer, len)) < 0)
                 die_errno("Could not read POST from stdin");
-        if (write(STDOUT_FILENO, buffer, len) < 0)
+        if (fwrite(buffer, 1, len, stdout) < len)
                 die_errno("Could not write POST to stdout");
         cgit_close_filter(ctx.cfg.auth_filter);
         exit(0);