From: Stanislav Malyshev Date: Tue, 8 Dec 2015 08:10:07 +0000 (-0800) Subject: Fixed bug #70755: fpm_log.c memory leak and buffer overflow X-Git-Tag: php-7.0.3RC1~72^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2eaa7556605ffc0d78c89965f5e905cf801207ef;p=php Fixed bug #70755: fpm_log.c memory leak and buffer overflow --- diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c index 86332c4c80..5aad9a08c9 100644 --- a/sapi/fpm/fpm/fpm_log.c +++ b/sapi/fpm/fpm/fpm_log.c @@ -448,6 +448,11 @@ int fpm_log_write(char *log_format) /* {{{ */ b += len2; len += len2; } + if (len >= FPM_LOG_BUFFER) { + zlog(ZLOG_NOTICE, "the log buffer is full (%d). The access log request has been truncated.", FPM_LOG_BUFFER); + len = FPM_LOG_BUFFER; + break; + } continue; }