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:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user