com php-src: Fixed bug #70755: fpm_log.c memory leak and buffer overflow: sapi/fpm/fpm/fpm_log.c
| From: | Anatol Belski | Date: | Mon, 04 Jan 2016 16:36:42 +0000 |
| Subject: | com php-src: Fixed bug #70755: fpm_log.c memory leak and buffer overflow: sapi/fpm/fpm/fpm_log.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90532@lists.php.net to get a copy of this message | ||
Commit: 2eaa7556605ffc0d78c89965f5e905cf801207ef
Author: Stanislav Malyshev <stas@php.net> Tue, 8 Dec 2015 00:10:07 -0800
Committer: Anatol Belski <ab@php.net> Mon, 4 Jan 2016 17:36:42 +0100
Parents: b0285db4b70186abf830b5d9741b038545f8799b
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2eaa7556605ffc0d78c89965f5e905cf801207ef
Log:
Fixed bug #70755: fpm_log.c memory leak and buffer overflow
Bugs:
https://bugs.php.net/70755
Changed paths:
M sapi/fpm/fpm/fpm_log.c
Diff:
diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c
index 86332c4..5aad9a0 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;
}