From 9f093f3a22512864682ac7d456aa7f3f294cfdbe Mon Sep 17 00:00:00 2001 From: Tom Kistner Date: Tue, 16 Aug 2005 12:32:32 +0000 Subject: [PATCH] Bugzilla 35: Fix buffer underrun when EOF condition occurs while reading a MIME header --- src/src/mime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src/mime.c b/src/src/mime.c index 051c8e097..486fd3d1f 100644 --- a/src/src/mime.c +++ b/src/src/mime.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/mime.c,v 1.11 2005/08/02 09:42:24 tom Exp $ */ +/* $Cambridge: exim/src/src/mime.c,v 1.12 2005/08/16 12:32:32 tom Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -484,7 +484,7 @@ int mime_get_header(FILE *f, uschar *header) { }; }; - if (header[num_copied-1] != ';') { + if ((num_copied > 0) && (header[num_copied-1] != ';')) { header[num_copied-1] = ';'; }; -- 2.30.2