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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 13 11:51:13 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:51 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. ;)

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

---------------------------------------------------------------------- 
 (0097595) svnbot (reporter) - 2009-01-13 11:51
 http://bugs.digium.com/view.php?id=14226#c97595 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 168547

_U  trunk/
U   trunk/funcs/func_logic.c

------------------------------------------------------------------------
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=168547 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-13 11:51 svnbot         Note Added: 0097595                          
======================================================================




More information about the asterisk-bugs mailing list