summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-30 02:16:22 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-30 02:16:22 +0200
commitba3df95552b771d49ce488939366ea7efc56f38a (patch)
tree4c835e4d691b65f4384262daa2692637a5b7bdc4
parent51f0e18963df1058fff2869ec108526a08bc0e43 (diff)
specifier: properly size newly allocated string
-rw-r--r--specifier.c2
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;