From: Yann Ylavic Date: Tue, 18 Nov 2014 13:53:24 +0000 (+0000) Subject: mod_authnz_fcgi: we don't need to reserve an extra response header byte since r1640036. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=109d47630c041fc6474680c23778ca219ca89eac;p=thirdparty%2Fapache%2Fhttpd.git mod_authnz_fcgi: we don't need to reserve an extra response header byte since r1640036. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640345 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/aaa/mod_authnz_fcgi.c b/modules/aaa/mod_authnz_fcgi.c index 51b15edd4a6..070e6094705 100644 --- a/modules/aaa/mod_authnz_fcgi.c +++ b/modules/aaa/mod_authnz_fcgi.c @@ -491,7 +491,7 @@ static apr_status_t handle_response(const fcgi_provider_conf *conf, apr_size_t readbuflen; apr_uint16_t clen; apr_uint16_t rid; - char readbuf[AP_IOBUFSIZE + 1]; + char readbuf[AP_IOBUFSIZE]; unsigned char farray[AP_FCGI_HEADER_LEN]; unsigned char plen; unsigned char type; @@ -527,8 +527,8 @@ static apr_status_t handle_response(const fcgi_provider_conf *conf, recv_again: /* if we need to keep reading more of a record's content */ - if (clen > sizeof(readbuf) - 1) { - readbuflen = sizeof(readbuf) - 1; + if (clen > sizeof(readbuf)) { + readbuflen = sizeof(readbuf); } else { readbuflen = clen; } @@ -541,7 +541,6 @@ static apr_status_t handle_response(const fcgi_provider_conf *conf, if (rv != APR_SUCCESS) { break; } - readbuf[readbuflen] = '\0'; } switch (type) {