From 48f423db400f6210b946699975277e9c383aca1f 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 efbc335486..2141369c62 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -174,8 +174,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;