[asterisk-bugs] [Asterisk 0015421]: [patch] Serious problem in pattern matching

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Nov 10 16:15:13 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15421 
====================================================================== 
Reported By:                jsmith
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15421
Category:                   PBX/pbx_config
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     ready for review
Target Version:             1.6.0.19
Asterisk Version:           SVN 
JIRA:                       SWP-273 
Regression:                 Yes 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-06-29 14:45 CDT
Last Modified:              2009-11-10 16:15 CST
====================================================================== 
Summary:                    [patch] Serious problem in pattern matching
Description: 
There appears to be a serious problem in the pattern matching in
Asterisk... for some reason, it thinks the following two extensions are
equivalent, when they're not.

exten => _N[2-4]X,1,NoOp(foo)
exten => _N[246]X,1,NoOp(bar)
====================================================================== 

---------------------------------------------------------------------- 
 (0113630) svnbot (reporter) - 2009-11-10 16:15
 https://issues.asterisk.org/view.php?id=15421#c113630 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 229360

U   branches/1.4/main/pbx.c

------------------------------------------------------------------------
r229360 | tilghman | 2009-11-10 16:15:11 -0600 (Tue, 10 Nov 2009) | 12
lines

If two pattern classes start with the same digit and have the same number
of characters, they will compare equal.
The example given in the issue report is that of [234] and [246], which
have
these characteristics, yet they are clearly not equivalent.  The code
still
uses these two characteristics, yet when the two scores compare equal, an
additional check will be done to compare all characters within the class
to
verify equality.
(closes issue https://issues.asterisk.org/view.php?id=15421)
 Reported by: jsmith
 Patches: 
       20091109__issue15421__2.diff.txt uploaded by tilghman (license 14)
 Tested by: jsmith, thedavidfactor

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=229360 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-10 16:15 svnbot         Checkin                                      
2009-11-10 16:15 svnbot         Note Added: 0113630                          
======================================================================




More information about the asterisk-bugs mailing list