[Home]

Summary:ASTERISK-10157: An incorrectly formatted voice mail will crash Asterisk
Reporter:Kevin Stewart (skavin)Labels:
Date Opened:2007-08-23 21:59:11Date Closed:2007-08-24 10:37:25
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:if an email with an invalid/corrupted mime body is played asterisk will crash



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

the below email will crash asterisk if played


Date: Mon, 6 Aug 2007 16:45:22 +1200
From: "italk Voicemail System" <voicemail@bob.com>
To: "" <9999999999@2bob.com>
Subject: [VOICEMAIL]: New voice message for 9999999999 from caller 9999999999
Message-ID: <46B6A762.00A228.00868@bob.com>
X-Asterisk-VM-Extension: 9999999999
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------Boundary-00=_M75CPI1UUY1D7XINTSM1"

.



Here is a patch to fix the issue that I am seeing body->nested.part->next->body.parameter may need to be checked as well


--- apps/app_voicemail.c.orig 2007-08-24 14:59:44.000000000 +1200
+++ apps/app_voicemail.c 2007-08-24 13:19:59.000000000 +1200
@@ -4433,7 +4433,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");
Comments:By: Mark Michelson (mmichelson) 2007-08-24 10:37:25

This is fixed in rev 80750 of 1.4 and 80751 of trunk.

Thanks for bringing this to our attention!