From 3f06bbd04a469d9709ed9bfed4959dc43751a55e Mon Sep 17 00:00:00 2001 From: William King Date: Sat, 18 May 2013 13:38:24 -0700 Subject: [PATCH] This was writing a null one space to the right, outside of the malloc'd buffer. On further review this uses apr_vsnprintf which always returns null terminated. --- src/switch_utils.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/switch_utils.c b/src/switch_utils.c index d54fabaa06..7cec27e204 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -185,8 +185,6 @@ SWITCH_DECLARE(char *) switch_find_parameter(const char *str, const char *param, r = malloc(mlen); } - *(r + mlen) = '\0'; - switch_snprintf(r, mlen, "%s", ptr); break;