changeset 34609:cb2667416fa5

(get_keyword): Make sure that isspace and similar aren't called with a negative argument.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 15 Dec 2000 14:33:25 +0000
parents 9286b7ab7104
children beea10bab07e
files lib-src/fakemail.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/fakemail.c	Fri Dec 15 14:32:55 2000 +0000
+++ b/lib-src/fakemail.c	Fri Dec 15 14:33:25 2000 +0000
@@ -253,18 +253,18 @@
 {
   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;