]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Alternate fix... profiling indicates that the string
authorJim Jagielski <jim@apache.org>
Sat, 8 Dec 2007 16:10:40 +0000 (16:10 +0000)
committerJim Jagielski <jim@apache.org>
Sat, 8 Dec 2007 16:10:40 +0000 (16:10 +0000)
termination is completely unneeded and superflous. In
which case, the original allocation size is sufficient
since nothing external worries about a NULL nor
looks for it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@602491 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index 7ab8c273705669da5a88c12bee1768f564a0164f..933f98276384dc378d8263ed7e4318fde937f1b9 100644 (file)
@@ -1525,7 +1525,7 @@ AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va)
 {
     apr_size_t written;
     struct ap_vrprintf_data vd;
-    char vrprintf_buf[AP_IOBUFSIZE+1];
+    char vrprintf_buf[AP_IOBUFSIZE];
 
     vd.vbuff.curpos = vrprintf_buf;
     vd.vbuff.endpos = vrprintf_buf + AP_IOBUFSIZE;
@@ -1537,9 +1537,6 @@ AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va)
 
     written = apr_vformatter(r_flush, &vd.vbuff, fmt, va);
 
-    /* tack on null terminator on remaining string */
-    *(vd.vbuff.curpos) = '\0';
-
     if (written != -1) {
         int n = vd.vbuff.curpos - vrprintf_buf;