1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

Fix off-by-one allocation

The return value of this function is pretty meaningless, but
leaving it alone for now.
This commit is contained in:
Nikita Popov
2018-07-20 17:52:56 +02:00
parent 6e2c54d3e7
commit ee561ff2a2
+1 -1
View File
@@ -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;
}