[asterisk-bugs] [JIRA] (ASTERISK-22910) [patch] - REPLACE() calls strcpy on overlapping memory when <replace-char> is empty
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Thu Feb 6 17:03:06 CST 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-22910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Jordan updated ASTERISK-22910:
-----------------------------------
Target Release Version/s: 12.1.0
> [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
> Target Release: 1.8.26.0, 11.8.0, 12.1.0
>
> 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