com php-src: Fix incorrect length calculation: sapi/fpm/fpm/zlog.c
| From: | Nikita Popov | Date: | Fri, 20 Jul 2018 15:47:53 +0000 |
| Subject: | com php-src: Fix incorrect length calculation: sapi/fpm/fpm/zlog.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102624@lists.php.net to get a copy of this message | ||
Commit: 6e2c54d3e7c57ad48dd8b1841bfdb85b16eba8cc
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 20 Jul 2018 17:47:53 +0200
Parents: fb0faf0208490ddec39b0c2b27aa3e2d5fe31301
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6e2c54d3e7c57ad48dd8b1841bfdb85b16eba8cc
Log:
Fix incorrect length calculation
sizeof char pointer != sizeof string literal.
Changed paths:
M sapi/fpm/fpm/zlog.c
Diff:
diff --git a/sapi/fpm/fpm/zlog.c b/sapi/fpm/fpm/zlog.c
index cea0325..d158c06 100644
--- a/sapi/fpm/fpm/zlog.c
+++ b/sapi/fpm/fpm/zlog.c
@@ -420,7 +420,7 @@ static inline ssize_t zlog_stream_unbuffered_write(
append = NULL;
} else {
append = "...";
- append_len = sizeof(append) - 1;
+ append_len = sizeof("...") - 1;
len = zlog_limit - stream->len - append_len;
}
}