Subject: smtp crash when using quell-content-id feature

From: Heiko Rommel <[email-masked]>
Date: Mon, 7 Jul 2003 15:37:31 +0200 (CEST)

Hi,

when using the quell-content-id feature for better interoperability with MS
Outlook, Pine crashes if both of the following conditions hold:

- more than one attachment
- the resulting message is rejected by the smtp server (e.g. because it is too big)

Pine crashes in pine/send.c:7401 because part->body.id is 0x0 on the second part
- which is bad for strcmp((*ppa)->id, part->body.id)

I tried to fix this (see the attached diff), but now the message header gets
corrupted if pine returns from an unsuccessful attempt to send the message via
smtp.  Symptoms I experienced:
- one of the attachment was deleted from the list but stored when postponing
- a string like "UNEXPECTED DATA after ..." was appended to the recipient list

Maybe you wizards could have a look ?

Heiko Rommel
SuSE Linux AG
--- pine4.56/pine/send.c
+++ pine4.56/pine/send.c
@@ -7398,9 +7398,10 @@
         for(part = bod->nested.part->next; part != NULL; part = part->next) {
 	    /* Already in list? */
             for(ppa = pico_a;
-		*ppa && strcmp((*ppa)->id, part->body.id);
-		ppa = &(*ppa)->next)
-	      ;
+		*ppa && part->body.id && strcmp((*ppa)->id, part->body.id);
+		ppa = &(*ppa)->next) 
+		;
+	   
 
 	    if(!*ppa){		/* Not in the list! append it... */
 		*ppa = (PATMT *)fs_get(sizeof(PATMT));

---

From: Mark Crispin <[email-masked]>
Date: Thu, 10 Jul 2003 08:41:14 -0700 (PDT)

Thank you very much for your message!  We'll get on it right away.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.