Fix rcache character test introduced in last commit
authorSam Hartman <hartmans@mit.edu>
Wed, 5 Mar 2003 00:47:51 +0000 (00:47 +0000)
committerSam Hartman <hartmans@mit.edu>
Wed, 5 Mar 2003 00:47:51 +0000 (00:47 +0000)
Ticket: 1370

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15222 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/srv_rcache.c

index 290f869e574bc408b470c8c45e66b6c18d748a28..c68bf87e9af8e49d66f04bad034a69e927d69ab7 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdio.h>
 
 /* Macro for valid RC name characters*/
-#define isinvalidrcname(x) (isgraph(x)||ispunct(x))
+#define isvalidrcname(x) ((!ispunct(x))&&isgraph(x))
 krb5_error_code KRB5_CALLCONV
 krb5_get_server_rcache(krb5_context context, const krb5_data *piece, krb5_rcache *rcptr)
 {
@@ -60,7 +60,7 @@ krb5_get_server_rcache(krb5_context context, const krb5_data *piece, krb5_rcache
     for (i = 0; i < piece->length; i++) {
        if (piece->data[i] == '\\')
            len++;
-       else if (!isinvalidrcname((int) piece->data[i]))
+       else if (!isvalidrcname((int) piece->data[i]))
            len += 3;
     }