Website Summary Files Commits Branches @commit @diff @stats
path: root / cgit.c
diff options
context:
space:
mode:
1 files changed, 1 insertions, 1 deletions
-rw-r--r--cgit.c2
diff --git a/cgit.c b/cgit.c
index d43b4fe..2efbb2c 100644
--- a/cgit.c
+++ b/cgit.c
@@ -684,7 +684,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);