summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--sapi/fpm/fpm/fpm_log.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index d9fcf14df4..f29a710c75 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ PHP NEWS
?? ??? 2015, PHP 5.5.31
+- FPM:
+ . Fixed bug #70755 (fpm_log.c memory leak and buffer overflow). (Stas)
+
- GD:
. Fixed bug #70976 (Memory Read via gdImageRotateInterpolated Array Index
Out of Bounds). (emmanuel dot law at gmail dot com).
diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c
index b0bf32ac16..187fe9bd07 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 TSRMLS_DC) /* {{{ */
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;
}