summary refs log tree commit diff
path: root/www/git.causal.agency/cgit/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'www/git.causal.agency/cgit/cgit.c')
-rw-r--r--www/git.causal.agency/cgit/cgit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/www/git.causal.agency/cgit/cgit.c b/www/git.causal.agency/cgit/cgit.c
index c4320f04..d8ea2212 100644
--- a/www/git.causal.agency/cgit/cgit.c
+++ b/www/git.causal.agency/cgit/cgit.c
@@ -674,7 +674,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);