[asterisk-bugs] [JIRA] (ASTERISK-22910) [patch] - REPLACE() calls strcpy on overlapping memory when <replace-char> is empty
Digium Subversion (JIRA)
noreply at issues.asterisk.org
Thu Jan 2 13:41:03 CST 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-22910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digium Subversion closed ASTERISK-22910.
----------------------------------------
Resolution: Fixed
> [patch] - REPLACE() calls strcpy on overlapping memory when <replace-char> is empty
> -----------------------------------------------------------------------------------
>
> Key: ASTERISK-22910
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-22910
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Functions/func_strings
> Affects Versions: 11.6.0, 12.0.0-beta2
> Reporter: Gareth Palmer
> Severity: Minor
> Attachments: func_strings.patch
>
>
> When calling REPLACE() with an empty replace-char argument; strcpy is used to overwrite the the matching <find-char>.
> However as the src and dest argument to strcpy must not overlap it causes other parts of the string to be overwritten with adjacent characters and the result is mangled.
> Patch replaces call to strcpy with memmove and adds a test suite case for REPLACE.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list