[asterisk-commits] tilghman: branch 1.6.2 r212631 - in /branches/1.6.2: ./ apps/app_voicemail.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 17 15:01:04 CDT 2009
Author: tilghman
Date: Mon Aug 17 15:01:00 2009
New Revision: 212631
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212631
Log:
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 #15720)
Reported by: tobias_e
........
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/apps/app_voicemail.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/apps/app_voicemail.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/apps/app_voicemail.c?view=diff&rev=212631&r1=212630&r2=212631
==============================================================================
--- branches/1.6.2/apps/app_voicemail.c (original)
+++ branches/1.6.2/apps/app_voicemail.c Mon Aug 17 15:01:00 2009
@@ -3573,7 +3573,10 @@
* doing a stat repeatedly on a predicted sequence. I suspect this
* is partially due to stat(2) internally doing a readdir(2) itself to
* find each file. */
- msgdir = opendir(dir);
+ if (!(msgdir = opendir(dir))) {
+ return -1;
+ }
+
while ((msgdirent = readdir(msgdir))) {
if (sscanf(msgdirent->d_name, "msg%30d", &msgdirint) == 1 && msgdirint < MAXMSGLIMIT)
map[msgdirint] = 1;
More information about the asterisk-commits
mailing list