From eefd8f767624ae2eb3dd4b96f70d3dec8dc8c2e9 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Tue, 12 Oct 2004 22:07:29 +0000 Subject: Merge 2004-03-25-6.2.5-egidy-parserec.diff. Gerd v. Egidy writes: a received header looking like this Received: from code ([20.191.144.116]) by currently causes fetchmail 6.2.5 to segfault when in multidrop/received mode. Looks like there is a check for \0 missing in parse_received, the attached patch fixes this. (Committer's note: the sample looks incomplete but anyways the patch makes sense to me.) svn path=/trunk/; revision=3941 --- transact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'transact.c') diff --git a/transact.c b/transact.c index c246df89..0c246a1d 100644 --- a/transact.c +++ b/transact.c @@ -217,7 +217,7 @@ static char *parse_received(struct query *ctl, char *bufp) for (sp = ok + 2; isspace((unsigned char)*sp); sp++) continue; tp = rbuf; - for (; !isspace((unsigned char)*sp); sp++) + for (; *sp && !isspace((unsigned char)*sp); sp++) RBUF_WRITE(*sp); *tp = '\0'; -- cgit v1.2.3