[asterisk-bugs] [Asterisk 0010502]: Check for callerid being present is incomplete.

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Aug 20 17:07:18 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10502 
====================================================================== 
Reported By:                dswartz
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10502
Category:                   Applications/app_zapateller
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.10.1  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             08-20-2007 16:42 CDT
Last Modified:              08-20-2007 17:07 CDT
====================================================================== 
Summary:                    Check for callerid being present is incomplete.
Description: 

The check currently is:

if (chan->cid.cid_num && nocallerid) {

This is fine if there never was a CID number.  If there was a string
present, but it was nulled out by an AGI script (or some context code),
this pointer will still be non-null, but will point (correctly) to a null
string.  Check should be more like:

if (chan->cid.cid_num && strlen(chan->cid.cid_num) && nocallerid) {

p.s. I have submitted a license and am waiting for approval.
====================================================================== 

---------------------------------------------------------------------- 
 qwell - 08-20-07 17:07  
---------------------------------------------------------------------- 
We have a function that does the length checking along with the NULL
checking.

ast_strlen_zero()

You should take a look at that. :) 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-20-07 17:07  qwell          Note Added: 0069120                          
======================================================================




More information about the asterisk-bugs mailing list