Skip to content

Commit

Permalink
FPM: zlog, fix free on wrong address for message prepend.
Browse files Browse the repository at this point in the history
  • Loading branch information
hwde authored and devnexen committed Jun 27, 2022
1 parent 7166932 commit 325ca31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS
Expand Up @@ -6,6 +6,9 @@ PHP NEWS
. Fixed bug #80047 (DatePeriod doesn't warn with custom DateTimeImmutable).
(Derick)

- FPM:
. Fixed zlog message prepend, free on incorrect address. (Heiko Weber)

- GD:
. Fixed bug GH-8848 (imagecopyresized() error refers to the wrong argument).
(cmb)
Expand Down
2 changes: 1 addition & 1 deletion sapi/fpm/fpm/zlog.c
Expand Up @@ -651,7 +651,7 @@ zlog_bool zlog_stream_set_msg_suffix(
stream->msg_final_suffix_len = strlen(final_suffix);
len = stream->msg_final_suffix_len + 1;
if (stream->msg_final_suffix != NULL) {
free(stream->msg_suffix);
free(stream->msg_final_suffix);
}
stream->msg_final_suffix = malloc(len);
if (stream->msg_final_suffix == NULL) {
Expand Down

0 comments on commit 325ca31

Please sign in to comment.