1 files changed, 1 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index 2efa962..3a65885 100644
--- a/cgit.c
+++ b/cgit.c
@@ -683,7 +683,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);
|