From 640509e6a71556f95c2688a1d62df27da6ff8da1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 10 Mar 2006 08:47:59 +0000 Subject: r14131: Fix Coverity bug # 127 (This used to be commit 4d0aa6f525c4756ca6942439468b484e3ca4b2fa) --- source4/lib/talloc/talloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c index 577fa4a182..5bb21ee6e6 100644 --- a/source4/lib/talloc/talloc.c +++ b/source4/lib/talloc/talloc.c @@ -960,11 +960,13 @@ char *talloc_append_string(const void *t, char *orig, const char *append) { char *ret; size_t olen = strlen(orig); - size_t alenz = strlen(append) + 1; + size_t alenz; if (!append) return orig; + alenz = strlen(append) + 1; + ret = talloc_realloc(t, orig, char, olen + alenz); if (!ret) return NULL; -- cgit