mod_authnz_fcgi: we don't need to add the trailing '\0' to parse response headers...
authorYann Ylavic <ylavic@apache.org>
Tue, 18 Nov 2014 13:53:24 +0000 (13:53 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 18 Nov 2014 13:53:24 +0000 (13:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640345 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_authnz_fcgi.c

index 51b15edd4a6e73e476700f2984f69147df23e2f5..070e60947058d9802a4b488be2314e7d31cf5e44 100644 (file)
@@ -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) {