com php-src: Fix off-by-one allocation: sapi/fpm/fpm/zlog.c

From: Date: Fri, 20 Jul 2018 15:52:56 +0000
Subject: com php-src: Fix off-by-one allocation: sapi/fpm/fpm/zlog.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102625@lists.php.net to get a copy of this message
Commit: ee561ff2a2ad6783c3f54092264ca2c622cf88f6 Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 20 Jul 2018 17:52:56 +0200 Parents: 6e2c54d3e7c57ad48dd8b1841bfdb85b16eba8cc Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee561ff2a2ad6783c3f54092264ca2c622cf88f6 Log: Fix off-by-one allocation The return value of this function is pretty meaningless, but leaving it alone for now. Changed paths: M sapi/fpm/fpm/zlog.c Diff: diff --git a/sapi/fpm/fpm/zlog.c b/sapi/fpm/fpm/zlog.c index d158c06..cd5260b 100644 --- a/sapi/fpm/fpm/zlog.c +++ b/sapi/fpm/fpm/zlog.c @@ -644,7 +644,7 @@ ssize_t zlog_stream_set_msg_suffix( } if (suffix != NULL) { stream->msg_suffix_len = len = strlen(suffix); - stream->msg_suffix = malloc(len); + stream->msg_suffix = malloc(len + 1); if (stream->msg_suffix == NULL) { return -1; }

« previous php.cvs (#102625) next »