From ba3df95552b771d49ce488939366ea7efc56f38a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 30 Apr 2010 02:16:22 +0200 Subject: [PATCH] specifier: properly size newly allocated string --- specifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifier.c b/specifier.c index a25f33a04..d8472e99e 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; -- 2.30.2