[asterisk-bugs] [Asterisk 0015720]: opendir() return code is not checked in last_message_index()

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Aug 17 15:01:30 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15720 
====================================================================== 
Reported By:                tobias_e
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15720
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     closed
Target Version:             1.6.1.4
Asterisk Version:           1.6.1.4 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-08-14 11:21 CDT
Last Modified:              2009-08-17 15:01 CDT
====================================================================== 
Summary:                    opendir() return code is not checked in
last_message_index()
Description: 
In last_message_index() opendir() is called without a check if the call
failed, causing asterisk to segfault if it failed:

        msgdir = opendir(dir);
        while ((msgdirent = readdir(msgdir))) {


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

---------------------------------------------------------------------- 
 (0109176) svnbot (reporter) - 2009-08-17 15:01
 https://issues.asterisk.org/view.php?id=15720#c109176 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 212631

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_voicemail.c

------------------------------------------------------------------------
r212631 | tilghman | 2009-08-17 15:01:29 -0500 (Mon, 17 Aug 2009) | 11
lines

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

........
  r212627 | tilghman | 2009-08-17 14:57:42 -0500 (Mon, 17 Aug 2009) | 4
lines
  
  Check the return value of opendir(3), or we may crash.
  (closes issue https://issues.asterisk.org/view.php?id=15720)
   Reported by: tobias_e
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-17 15:01 svnbot         Checkin                                      
2009-08-17 15:01 svnbot         Note Added: 0109176                          
======================================================================




More information about the asterisk-bugs mailing list