From: Tom Kistner Date: Tue, 16 Aug 2005 12:32:32 +0000 (+0000) Subject: Bugzilla 35: Fix buffer underrun when EOF condition occurs while reading a MIME header X-Git-Tag: exim-4_53~51 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9f093f3a22512864682ac7d456aa7f3f294cfdbe;p=exim.git Bugzilla 35: Fix buffer underrun when EOF condition occurs while reading a MIME header --- 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] = ';'; };