]> git.sur5r.net Git - openldap/blobdiff - contrib/whois++/command.c
Annoying little son of a `free' BUG fixed.
[openldap] / contrib / whois++ / command.c
index 1b109ae65c7a4a132091b0a5135d8a91dacb6b89..638442e897c180cd51a09280d0968c022eb29427 100644 (file)
@@ -88,7 +88,7 @@ getToken( char *token )
                if ( log )
                        syslog( LOG_INFO, "Whois++ Query: %s", buffer );
        }
-       while ( buffer[idx] != '\0' && isspace( buffer[idx] ) )
+       while ( buffer[idx] != '\0' && isspace( (unsigned char) buffer[idx] ) )
                idx++;
        token[0] = buffer[idx++];
        token[1] = '\0';
@@ -154,7 +154,8 @@ getToken( char *token )
                                token[i++] = buffer[idx++];
                        else
                                token[i++] = ch;
-               } while ( ch != '\0' && !isspace( ch ) && !isspecial( ch ) );
+               } while ( ch != '\0' &&
+                         !isspace( (unsigned char) ch ) && !isspecial( ch ) );
                token[--i] = '\0';
                idx--;
 /**/           /*
@@ -376,7 +377,7 @@ processTerm(
                } else {
                        if ( ( s = strchr( buffer, ',' ) ) != NULL ) {
                                *s++ = '\0';
-                               while ( *s && isspace( *s ) )
+                               while ( *s && isspace( (unsigned char) *s ) )
                                        s++;
                                sprintf( query, "(sn%s%s)",
                                        (soundex)?"~=":"=", buffer );
@@ -384,7 +385,7 @@ processTerm(
                                /* let's just make sure there is no title */
                                if ( ( t = strrchr( s, ',' ) ) != NULL ) {
                                        *t++ = '\0';
-                                       while ( *t && isspace( *t ) )
+                                       while ( *t && isspace( (unsigned char) *t ) )
                                                t++;
                                        sprintf( query, "(personalTitle%s%s)",
                                                (soundex)?"~=":"=", t );