From 68e0b1c5ff21d11f3a293de6de7c32d61a93a662 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 27 Nov 2005 16:11:27 +0000 Subject: Revise a check that didn't work on 64-bit SUSE Linux 10.0. svn path=/trunk/; revision=4480 --- imap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap.c b/imap.c index 1f62f696..ed5ca59d 100644 --- a/imap.c +++ b/imap.c @@ -1038,7 +1038,7 @@ static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp) if ((cp = strchr(buf, '{'))) { errno = 0; *lenp = (int)strtol(cp + 1, (char **)NULL, 10); - if (errno == ERANGE && (*lenp == LONG_MAX || *lenp == LONG_MIN)) + if (errno == ERANGE || *lenp < 0) *lenp = -1; /* length is too big/small for us to handle */ } else -- cgit v1.2.3