From 26c01383ae438f8e9483cb6366e34685475d768d Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 8 Oct 2003 20:23:42 +0000 Subject: certain email kills fetchmail. CAN-2003-0790 --- mail/fetchmail/Makefile | 4 ++-- mail/fetchmail/patches/patch-ag | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 mail/fetchmail/patches/patch-ag (limited to 'mail/fetchmail') diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile index 05d63885bed..c6433597737 100644 --- a/mail/fetchmail/Makefile +++ b/mail/fetchmail/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.133 2003/09/12 13:11:56 grant Exp $ +# $NetBSD: Makefile,v 1.134 2003/10/08 20:23:42 itojun Exp $ DISTNAME= fetchmail-6.2.4 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail MASTER_SITES= http://catb.org/~esr/fetchmail/ \ http://sunsite.unc.edu/pub/Linux/system/mail/pop/ diff --git a/mail/fetchmail/patches/patch-ag b/mail/fetchmail/patches/patch-ag new file mode 100644 index 00000000000..145cfb5df1f --- /dev/null +++ b/mail/fetchmail/patches/patch-ag @@ -0,0 +1,22 @@ +$NetBSD: patch-ag,v 1.1 2003/10/08 20:23:43 itojun Exp $ + +--- rfc822.c- 2003-10-06 13:28:06.000000000 +0900 ++++ rfc822.c 2003-10-06 13:28:41.000000000 +0900 +@@ -176,7 +176,7 @@ + case 3: /* we're in a <>-enclosed address */ + if (*from == '@' || *from == '!') + has_host_part = TRUE; +- else if (*from == '>' && from[-1] != '<') ++ else if (*from == '>' && (from > buf && from[-1] != '<')) + { + state = 1; + if (!has_host_part) +@@ -198,7 +198,7 @@ + /* + * If we passed a comma, reset everything. + */ +- if (from[-1] == ',' && !parendepth) { ++ if ((from > buf && from[-1] == ',') && !parendepth) { + has_host_part = has_bare_name_part = FALSE; + parens_from = NULL; + } -- cgit v1.2.3