From 859cbb401c0f233886ac8f13a1bb2ab7bf09f0a8 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 15 Dec 2000 14:33:25 +0000 Subject: [PATCH] (get_keyword): Make sure that isspace and similar aren't called with a negative argument. --- lib-src/fakemail.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index c4354ab45a2..e011d352ffd 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -253,18 +253,18 @@ get_keyword (field, rest) { static char keyword[KEYWORD_SIZE]; register char *ptr; - register char c; + register int c; ptr = &keyword[0]; - c = *field++; + c = (unsigned char) *field++; if (isspace (c) || c == ':') return ((char *) NULL); *ptr++ = (islower (c) ? toupper (c) : c); - while (((c = *field++) != ':') && ! isspace (c)) + while (((c = (unsigned char) *field++) != ':') && ! isspace (c)) *ptr++ = (islower (c) ? toupper (c) : c); *ptr++ = '\0'; while (isspace (c)) - c = *field++; + c = (unsigned char) *field++; if (c != ':') return ((char *) NULL); *rest = field; -- 2.39.2