1
0
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:
Lennart Poettering 2010-04-30 02:16:22 +02:00
parent 51f0e18963
commit ba3df95552

View File

@ -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;