From: Jim Jagielski Date: Sat, 8 Dec 2007 16:10:40 +0000 (+0000) Subject: Alternate fix... profiling indicates that the string X-Git-Tag: 2.3.0~1167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5530bc6f5e445e76aad22f1bb3de12eff6cae9a;p=thirdparty%2Fapache%2Fhttpd.git Alternate fix... profiling indicates that the string 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 --- diff --git a/server/protocol.c b/server/protocol.c index 7ab8c273705..933f9827638 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -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;