Hi

On Tue, Aug 02, 2011 at 02:28:58PM +0200, Marcin Szewczyk, Wodny wrote:
> Package: esmtp
> Version: 1.2-4squeeze1
> Severity: normal
> Tags: patch
> 
> Test case:
> esmtp -t -i < ../mail_with_heads.txt
> and inside this file:
> #v+
> To:
> From: alice
> 
> test
> #v-

Thank you for the report and the patch. I slightly modified it, and
would like to apply the attached version.

Regards
Salvatore
Description: Don't segfault if recipient header is empty
Origin: vendor
Bug: http://bugs.debian.org/636346
Forwarded: no
Author: Salvatore Bonaccorso <car...@debian.org>
Last-Update: 2011-08-02

--- a/local.c
+++ b/local.c
@@ -106,7 +106,13 @@
 				}
 				p += written;
 			}
-			names[--nameslen] = '\0';		/* chop trailing space */
+			if(nameslen > 0)
+			{
+				names[--nameslen] = '\0';		/* chop trailing space */
+			} else {
+				fprintf(stderr, "Failed to parse recipient header\n");
+				exit(EX_DATAERR);
+			}
 		} else {
 			nameslen = (strlen(force_mda) + 3);	// 'force_mda'
 			names = (char *)xmalloc(nameslen + 1);	// 'force_mda'\0

Attachment: signature.asc
Description: Digital signature

Reply via email to