mirror of
https://github.com/systemd/systemd.git
synced 2025-03-21 02:50:18 +03:00
specifier: properly size newly allocated string
This commit is contained in:
parent
51f0e18963
commit
ba3df95552
@ -70,7 +70,7 @@ char *specifier_printf(const char *text, const Specifier table[], void *userdata
|
||||
j = t - r;
|
||||
k = strlen(w);
|
||||
|
||||
if (!(n = new(char, j + k + (l - (f - text)) + 1))) {
|
||||
if (!(n = new(char, j + k + l + 1))) {
|
||||
free(r);
|
||||
free(w);
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user