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.

This commit is contained in:
William King 2013-05-18 13:38:24 -07:00
parent de0fea316e
commit 3f06bbd04a

View File

@ -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;