[Home]

Summary:ASTERISK-12984: app_directory crashses Asterisk when voicemail entry doesn't have a name
Reporter:Mitch Sharp (bluecrow76)Labels:
Date Opened:2008-10-29 15:11:36Date Closed:2008-10-29 15:42:53
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_directory
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-1.6.0.1-app_directory-bugreport.txt
Description:example voicemail.conf:
[voicemail-context]
101 => 101
102 => 102,Extension 102

After the Directory application requests the first three letters for the search, when it performs the search, it will crash asterisk when it tries to parse the line with no name.

My fix was to change the offending lines to something like the following, but it appears a check needs to be added.
101 => 101,101
Comments:By: Mitch Sharp (bluecrow76) 2008-10-29 15:12:35

Attached file asterisk-1.6.0.1-app_directory-bugreport.txt with gdb output.

By: Mark Michelson (mmichelson) 2008-10-29 15:40:39

Yeah, this is a simple case where the idea of a NULL pointer was not considered in the design and needs to be checked for. This will be a really easy fix and I'll have it committed soon.

By: Digium Subversion (svnbot) 2008-10-29 15:42:51

Repository: asterisk
Revision: 152646

U   trunk/apps/app_directory.c

------------------------------------------------------------------------
r152646 | mmichelson | 2008-10-29 15:42:51 -0500 (Wed, 29 Oct 2008) | 9 lines

If there was no named defined in a voicemail.conf mailbox
entry, then app_directory would crash when attempting to
read that entry from the file. We now check for the NULL
or empty string properly so that there will be no crash.

(closes issue ASTERISK-12984)
Reported by: bluecrow76


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

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