[svn-commits] mmichelson: trunk r80751 - in /trunk: ./ apps/app_voicemail.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 24 10:53:37 CDT 2007


Author: mmichelson
Date: Fri Aug 24 10:53:36 2007
New Revision: 80751

URL: http://svn.digium.com/view/asterisk?view=rev&rev=80751
Log:
Merged revisions 80750 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80750 | mmichelson | 2007-08-24 10:51:03 -0500 (Fri, 24 Aug 2007) | 3 lines

Fix a possible crash in IMAP voicemail.


........

Modified:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=80751&r1=80750&r2=80751
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri Aug 24 10:53:36 2007
@@ -4650,7 +4650,7 @@
 	mail_fetchstructure (vms->mailstream,vms->msgArray[vms->curmsg],&body);
 	
 	/* We have the body, now we extract the file name of the first attachment. */
-	if (body->nested.part->next && body->nested.part->next->body.parameter->value) {
+	if (body->nested.part && body->nested.part->next && body->nested.part->next->body.parameter->value) {
 		attachedfilefmt = ast_strdupa(body->nested.part->next->body.parameter->value);
 	} else {
 		ast_log(LOG_ERROR, "There is no file attached to this IMAP message.\n");
@@ -5049,7 +5049,7 @@
 	for (i = 0; i < vms_p->mailstream->nmsgs; i++) {
 		mail_fetchstructure(vms_p->mailstream, i + 1, &body);
 		/* We have the body, now we extract the file name of the first attachment. */
-		if (body->nested.part->next && body->nested.part->next->body.parameter->value) {
+		if (body->nested.part && body->nested.part->next && body->nested.part->next->body.parameter->value) {
 			attachment = ast_strdupa(body->nested.part->next->body.parameter->value);
 		} else {
 			ast_log(LOG_ERROR, "There is no file attached to this IMAP message.\n");




More information about the svn-commits mailing list