make input a krb5_data rather than null-term string
authorJohn Kohl <jtkohl@mit.edu>
Fri, 19 Jul 1991 16:53:13 +0000 (16:53 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Fri, 19 Jul 1991 16:53:13 +0000 (16:53 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2188 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/srv_rcache.c

index 77380c89d3fa1fe54f0b653e7af10d499b17f3eb..918e729656ea19a256bdb2dbb8440d03203ece70 100644 (file)
@@ -35,21 +35,21 @@ static char rcsid_srv_rcache_c[] =
 
 krb5_error_code
 krb5_get_server_rcache(piece, rcptr)
-const char *piece;
+const krb5_data *piece;
 krb5_rcache *rcptr;
 {
     krb5_rcache rcache;
     char *cachename;
     extern krb5_deltat krb5_clockskew;
     krb5_error_code retval;
-    int len = strlen(piece);
+    int len = piece->length;
 
     if (rcache = (krb5_rcache) malloc(sizeof(*rcache))) {
        if (!(retval = krb5_rc_resolve_type(&rcache, "dfl"))) {
 
            if (cachename = malloc(len+1+3)) {
                strcpy(cachename, "rc_");
-               strcat(cachename, piece);
+               strncat(cachename, piece->data, len);
                cachename[len+3] = '\0';
 
                if (!(retval = krb5_rc_resolve(rcache, cachename))) {