Created attachment 31919 [details] stderr-terminate-buffer.patch iobuf isn't terminated before passed to ap_log_rerror
This for the report. Here is a simpler fix: Index: modules/proxy/mod_proxy_fcgi.c =================================================================== --- modules/proxy/mod_proxy_fcgi.c (revision 1617253) +++ modules/proxy/mod_proxy_fcgi.c (working copy) @@ -665,7 +665,7 @@ /* TODO: Should probably clean up this logging a bit... */ if (clen) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01071) - "Got error '%s'", iobuf); + "Got error '%.*s'", (int)readbuflen, iobuf); } if (clen > readbuflen) { I'll commit that when I get a chance to test...
The simpler one was initial patch, but mine is a bit faster :)
>The simpler one was initial patch, but mine is a bit faster :) That seems odd, since it throws away the knowledge of how long the string is. With .*, the string length doesn't have to be calculated.
(In reply to Jeff Trawick from comment #3) > >The simpler one was initial patch, but mine is a bit faster :) > That seems odd, since it throws away the knowledge of how long the string is. > > With .*, the string length doesn't have to be calculated. That's because ap_log_rerror has to walk down the array until either the first 0-byte or the supplied length in order to determine the "real" length of the array. See https://github.com/apache/apr/blob/trunk/strings/apr_snprintf.c#L975 However I'm totally fine with your patch as well. Just wanted to point this out.
Thanks for explaining (blush). We'll go with your original, unposted patch which was the same as mine.
The fix is now in httpd trunk with r1618401, and is proposed for backport to the 2.4.x branch. Thanks!
BTW, in the comment pointed out by Manuel, in the string "My reading is is precision is specified and", shouldn't "is is" be "is if" ?
This is in the 2.4.x branch and will be in the next release.