Files
asterisk/funcs
Richard Mudgett c813912d14 Fix crash with STRREPLACE function.
The ast_func_read() function calls the .read2 callback with the len
parameter set to zero indicating no size restrictions on the supplied
ast_str buffer.  The value was used to dimension a local starts[] array
with the array subsequently used.

* Reworked the strreplace() function to perform the string replacement in
a straight forward manner.  Eliminated the need for the starts[] array.

(closes issue ASTERISK-18545)
Reported by: Federico Alves
Patches:
      jira_asterisk_18545_v10.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Federico Alves


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@337119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20 22:47:45 +00:00
..