about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cgit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c index e2d7891..fda0aa4 100644 --- a/cgit.c +++ b/cgit.c
@@ -659,13 +659,13 @@ static inline void open_auth_filter(const char *function)
659static inline void authenticate_post(void) 659static inline void authenticate_post(void)
660{ 660{
661 char buffer[MAX_AUTHENTICATION_POST_BYTES]; 661 char buffer[MAX_AUTHENTICATION_POST_BYTES];
662 unsigned int len; 662 ssize_t len;
663 663
664 open_auth_filter("authenticate-post"); 664 open_auth_filter("authenticate-post");
665 len = ctx.env.content_length; 665 len = ctx.env.content_length;
666 if (len > MAX_AUTHENTICATION_POST_BYTES) 666 if (len > MAX_AUTHENTICATION_POST_BYTES)
667 len = MAX_AUTHENTICATION_POST_BYTES; 667 len = MAX_AUTHENTICATION_POST_BYTES;
668 if (read(STDIN_FILENO, buffer, len) < 0) 668 if ((len = read(STDIN_FILENO, buffer, len)) < 0)
669 die_errno("Could not read POST from stdin"); 669 die_errno("Could not read POST from stdin");
670 if (write(STDOUT_FILENO, buffer, len) < 0) 670 if (write(STDOUT_FILENO, buffer, len) < 0)
671 die_errno("Could not write POST to stdout"); 671 die_errno("Could not write POST to stdout");