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
+1 -1
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;