[asterisk-bugs] [Asterisk 0014226]: crash in comparation with 'nothing'

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 13 11:52:42 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14226 
====================================================================== 
Reported By:                caspy
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   14226
Category:                   General
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     closed
Asterisk Version:           1.6.0.3-rc1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-01-13 04:04 CST
Last Modified:              2009-01-13 11:52 CST
====================================================================== 
Summary:                    crash in comparation with 'nothing'
Description: 
(i don't know which category to set, so 'General'. sorry)

i have such string in extentions.ael:
 if (${IFTIME(9:01-18:59|mon-fri|*|*?1)} = 1) { goto workinghours; };
(mention, that in IFTIME function i don't set 'false' condition)

in 'dialplan show' it became looking so:
 15. GotoIf($[${IFTIME(9:01-18:59|mon-fri|*|*?1)} = 1]?16:17) [pbx_ael]

and than, if i run this context at NONworking hours, asterisk crashes.
output from gdb:

Core was generated by `/usr/sbin/asterisk -f -g -q'.
Program terminated with signal 11, Segmentation fault.
http://bugs.digium.com/view.php?id=0  iftime (chan=0xb7a3ac30, cmd=0xb6e68db0
"IFTIME", data=0x0,
buf=0xb6e68e20 "", len=4096) at
/usr/home/caspy/compile/asterisk-1.6.0.3-rc1/include/asterisk/strings.h:196
196     AST_INLINE_API(
(gdb)


If i put 'false' condition, like:
  if (${IFTIME(9:01-18:59|mon-fri|*|*?1:0)} = 1) {....
everything becomes ok.

So, i think, this is because a comparation between digit and (NULL), but
in this case any kind of error would be better than full crash. ;)

====================================================================== 

---------------------------------------------------------------------- 
 (0097597) svnbot (reporter) - 2009-01-13 11:52
 http://bugs.digium.com/view.php?id=14226#c97597 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 168549

_U  branches/1.6.1/
U   branches/1.6.1/funcs/func_logic.c

------------------------------------------------------------------------
r168549 | tilghman | 2009-01-13 11:52:42 -0600 (Tue, 13 Jan 2009) | 20
lines

Merged revisions 168547 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r168547 | tilghman | 2009-01-13 11:51:12 -0600 (Tue, 13 Jan 2009) | 13
lines
  
  Merged revisions 168546 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r168546 | tilghman | 2009-01-13 11:48:00 -0600 (Tue, 13 Jan 2009) | 6
lines
    
    If either conditional is NULL, don't try copying it.
    (closes issue http://bugs.digium.com/view.php?id=14226)
     Reported by: caspy
     Patches: 
           20090113__bug14226.diff.txt uploaded by Corydon76 (license 14)
  ........
................

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-13 11:52 svnbot         Checkin                                      
2009-01-13 11:52 svnbot         Note Added: 0097597                          
======================================================================




More information about the asterisk-bugs mailing list