mirror of
https://github.com/tmux/tmux.git
synced 2026-04-16 03:56:28 +00:00
Do not leak trimmed string when expanding, found by ossfuzz.
This commit is contained in:
2
format.c
2
format.c
@@ -5325,6 +5325,7 @@ done:
|
||||
if (marker != NULL && strcmp(new, value) != 0) {
|
||||
free(value);
|
||||
xasprintf(&value, "%s%s", new, marker);
|
||||
free(new);
|
||||
} else {
|
||||
free(value);
|
||||
value = new;
|
||||
@@ -5335,6 +5336,7 @@ done:
|
||||
if (marker != NULL && strcmp(new, value) != 0) {
|
||||
free(value);
|
||||
xasprintf(&value, "%s%s", marker, new);
|
||||
free(new);
|
||||
} else {
|
||||
free(value);
|
||||
value = new;
|
||||
|
||||
Reference in New Issue
Block a user