[Home]

Summary:ASTERISK-14657: opendir() return code is not checked in last_message_index()
Reporter:Tobias Engel (tobias_e)Labels:
Date Opened:2009-08-14 11:21:06Date Closed:2009-08-17 15:01:30
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
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))) {



****** ADDITIONAL INFORMATION ******

This bug seems to be present in at least all 1.6.1.x versions.
Comments:By: Digium Subversion (svnbot) 2009-08-17 14:58:11

Repository: asterisk
Revision: 212627

U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r212627 | tilghman | 2009-08-17 14:58:11 -0500 (Mon, 17 Aug 2009) | 4 lines

Check the return value of opendir(3), or we may crash.
(closes issue ASTERISK-14657)
Reported by: tobias_e

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

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

By: Digium Subversion (svnbot) 2009-08-17 14:59:21

Repository: asterisk
Revision: 212628

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

------------------------------------------------------------------------
r212628 | tilghman | 2009-08-17 14:59:21 -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 ASTERISK-14657)
  Reported by: tobias_e
........

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

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

By: Digium Subversion (svnbot) 2009-08-17 15:00:36

Repository: asterisk
Revision: 212630

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

------------------------------------------------------------------------
r212630 | tilghman | 2009-08-17 15:00:35 -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 ASTERISK-14657)
  Reported by: tobias_e
........

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

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

By: Digium Subversion (svnbot) 2009-08-17 15:01:29

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 ASTERISK-14657)
  Reported by: tobias_e
........

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

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