[asterisk-bugs] [Asterisk 0018041]: Crash when assigning 2 return vallues to an ARRAY with FUNC_ODBC call

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Sep 24 06:07:53 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18041 
====================================================================== 
Reported By:                asgaroth
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   18041
Category:                   Functions/func_odbc
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.2.13 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-09-23 12:50 CDT
Last Modified:              2010-09-24 06:07 CDT
====================================================================== 
Summary:                    Crash when assigning 2 return vallues to an ARRAY
with FUNC_ODBC call
Description: 
When an odbc returns 2 values to be set in an array refereces asterisk
crashes.
====================================================================== 

---------------------------------------------------------------------- 
 (0127360) asgaroth (reporter) - 2010-09-24 06:07
 https://issues.asterisk.org/view.php?id=18041#c127360 
---------------------------------------------------------------------- 
I did some more testing and it looks like the problem may be related to the
comma that is passed back by func_odbc, it looks like it needs to be
escaped.

If I setup an extension as follows:

exten => _X.,1,Set(ARRAY(Status,NumCalls)=OK,0)
exten => _X.,n,NoOp(Status: ${Status} Current-Calls: ${NumCalls})

Then asterisk crashes, however, if I modify the extension to escap the
comma, as follows:

exten => _X.,n,Set(ARRAY(Status,NumCalls)=OK\,0)
exten => _X.,n,NoOp(Status: ${Status} Current-Calls: ${NumCalls})

Then the assignment operation works as expected.

I tried to add the escapecommas=yes parameter to odbc function in question
but it has no effect on asterisk crashing. Is it possible that it is not
escaping the comma when returning the data back to the ARRAY faunction? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-09-24 06:07 asgaroth       Note Added: 0127360                          
======================================================================




More information about the asterisk-bugs mailing list