diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-30 02:16:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-30 02:16:22 +0200 |
commit | ba3df95552b771d49ce488939366ea7efc56f38a (patch) | |
tree | 4c835e4d691b65f4384262daa2692637a5b7bdc4 /specifier.c | |
parent | 51f0e18963df1058fff2869ec108526a08bc0e43 (diff) |
specifier: properly size newly allocated string
Diffstat (limited to 'specifier.c')
-rw-r--r-- | specifier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/specifier.c b/specifier.c index a25f33a047..d8472e99ed 100644 --- a/specifier.c +++ b/specifier.c @@ -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; |