Summary: | ASTERISK-18545: System can crash when using long strings with STRREPLACE() | ||
Reporter: | Private Name (falves11) | Labels: | |
Date Opened: | 2011-09-13 19:57:23 | Date Closed: | 2011-09-20 17:53:40 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Functions/func_strings |
Versions: | SVN | Frequency of Occurrence | |
Related Issues: | |||
Environment: | rdhat | Attachments: | ( 0) asterisk_crash_trunk.rtf ( 1) asterisk_crash_trunk.txt ( 2) jira_asterisk_18545_v10.patch |
Description: | It crashes around the function strreplace . I am uploading the trace. | ||
Comments: | By: Paul Belanger (pabelanger) 2011-09-13 21:25:16.509-0500 Please upload your backtraces as .txt files, not .rtf By: Leif Madsen (lmadsen) 2011-09-14 07:53:49.780-0500 Upload your traces as text files, not RTF. File issues with useful subjects and not generalized statements. By: Private Name (falves11) 2011-09-18 15:30:22.172-0500 I am using trunk and it is absolutely stable, but because I am not using the function strreplace() anymore. My guess is it steps outside its buffer. My strings can be very long, more than 1K. By: Private Name (falves11) 2011-09-19 15:49:44.048-0500 Please let me know when can I try it. I just need to comment out two lines of code and un-comment other two. By: Richard Mudgett (rmudgett) 2011-09-19 18:25:59.154-0500 [^jira_asterisk_18545_v10.patch] should fix the crash. The file should apply cleanly to trunk as well. You will need to update to the latest v10 or trunk func_strings.c as another fix was committed to STRREPLACE today. By: Private Name (falves11) 2011-09-19 18:55:51.541-0500 It went in production at 7:50 PM, with 125 open calls. Every call uses strreplace() twice. I will let you know tomorrow at peak time, around 2 PM, if it is stable. By: Private Name (falves11) 2011-09-20 14:47:16.130-0500 The fix works perfectly. Can somebody bring this function to 1.8? I don't want to use trunk in production, and I need to do some heavy string replacing. I is absolutely unacceptable that the "Asterisk language", because this no longer a PBX, but telecom development environment, needs to rely on third party libraries to do something so simple as string replacement. I was forced to create a function in func_odbc and go all the way out to the mysql driver, just to replace a string,twice in a single call. It is absurd. |