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:
parent
dec5a592ca
commit
48f423db40
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue