[asterisk-bugs] [Asterisk 0014362]: [patch] Putting a comma in an extension dialpattern causes eventual seg fault

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 30 08:32:03 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14362 
====================================================================== 
Reported By:                Nick_Lewis
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   14362
Category:                   Core/PBX
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.6.1-beta4 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-01-29 07:25 CST
Last Modified:              2009-01-30 08:32 CST
====================================================================== 
Summary:                    [patch] Putting a comma in an extension dialpattern
causes eventual seg fault
Description: 
If there is erroneously a comma in an extension dialpattern such as 

_9[1-3,5-9]. 

this leads some time later to a segmentation fault by various *s2=???
assignments in add_exten_to_pattern_tree() of pbx.c

There looks to be a string-unbounded while loop causing it 
====================================================================== 

---------------------------------------------------------------------- 
 (0099126) Nick_Lewis (reporter) - 2009-01-30 08:32
 http://bugs.digium.com/view.php?id=14362#c99126 
---------------------------------------------------------------------- 
The only reason I suggested it is that it is already done this way for
other characters such as 
[ ] -

I agree that the example dialpattern is a bit ugly but all of it with the
exception of backslash comma is the current implementation. i.e.

exten => _\[strange&weird\][\-;]\\etc\\,1,noop()

Perhaps it also needs to be possible to do this in a more attractive way.
Is this what the paren and quote bits of pbx_strsep() do?

Anyway if using a special pbx_strsep() then I think it needs to be used in
pbx_parseable_goto() too 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-30 08:32 Nick_Lewis     Note Added: 0099126                          
======================================================================




More information about the asterisk-bugs mailing list