krb5_free_checksum_contents(context, &cksum);
return KRB5_RC_MALLOC;
}
- ptr = hash;
+
for (i = 0, ptr = hash; i < cksum.length; i++, ptr += 2)
snprintf(ptr, 3, "%02X", cksum.contents[i]);
*ptr = '\0';
krb5_octet *bp;
size_t remain;
char *rcname;
- size_t namelen;
char *fnamep;
required = 0;
/* Our identifier */
(void) krb5_ser_pack_int32(KV5M_RCACHE, &bp, &remain);
- /* Calculate the length of the name */
- namelen = (rcache->ops && rcache->ops->type) ?
- strlen(rcache->ops->type)+1 : 0;
fnamep = krb5_rc_get_name(kcontext, rcache);
- namelen += (strlen(fnamep)+1);
if (rcache->ops && rcache->ops->type) {
if (asprintf(&rcname, "%s:%s", rcache->ops->type, fnamep) < 0)
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
ibuf = 0;
if (ibuf == KV5M_RCACHE) {
- kret = ENOMEM;
/* Get the length of the rcache name */
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);