From a4191ed7882f8991bbbfb4359a609fd7d39accaf Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 1 Jul 2011 03:26:53 +0000 Subject: [PATCH] isspace should only get unsigned-char values or EOF git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25010 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kadm5/alt_prof.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/kadm5/alt_prof.c b/src/lib/kadm5/alt_prof.c index 6537d3025..35f078e1a 100644 --- a/src/lib/kadm5/alt_prof.c +++ b/src/lib/kadm5/alt_prof.c @@ -1161,9 +1161,11 @@ krb5_match_config_pattern(const char *string, const char *pattern) int len = strlen(pattern); for (ptr = strstr(string,pattern); ptr != 0; ptr = strstr(ptr+len,pattern)) { - if (ptr == string || isspace(*(ptr-1)) || *(ptr-1) ==',') { + if (ptr == string + || isspace((unsigned char)*(ptr-1)) + || *(ptr-1) ==',') { next = *(ptr + len); - if (next == '\0' || isspace(next) || next ==',') { + if (next == '\0' || isspace((unsigned char)next) || next ==',') { return TRUE; } } -- 2.26.2