[Asterisk-cvs] asterisk/apps app_voicemail.c,1.151.2.20,1.151.2.21

russell russell
Thu Aug 4 18:59:53 CDT 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv3596/apps

Modified Files:
      Tag: v1-0
	app_voicemail.c 
Log Message:
fix potential crash in close_mailbox (bug #4800)


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.151.2.20
retrieving revision 1.151.2.21
diff -u -d -r1.151.2.20 -r1.151.2.21
--- app_voicemail.c	12 Jul 2005 15:27:09 -0000	1.151.2.20
+++ app_voicemail.c	4 Aug 2005 23:03:56 -0000	1.151.2.21
@@ -2655,9 +2655,11 @@
 			vm_delete(vms->fn);
 		} 
 		ast_unlock_path(vms->curdir);
-	} 
-	memset(vms->deleted, 0, sizeof(vms->deleted)); 
-	memset(vms->heard, 0, sizeof(vms->heard)); 
+	}
+	if (vms->deleted)
+		memset(vms->deleted, 0, sizeof(vms->deleted)); 
+	if (vms->heard)
+		memset(vms->heard, 0, sizeof(vms->heard)); 
 }
 
 static int vm_play_folder_name(struct ast_channel *chan, char *mbox)




More information about the svn-commits mailing list