krb5/krb5-1.6-ldap-init.patch
Nalin Dahyabhai 446760b8bf - fix an unitialized length count which caused the plugin to attempt to
read from an uninitialized pointer when reading back salted key which
    didn't include a non-default salt
2007-05-04 18:06:26 +00:00

15 lines
533 B
Diff

Index: src/lib/krb5/asn.1/ldap_key_seq.c
===================================================================
--- src/lib/krb5/asn.1/ldap_key_seq.c (revision 19509)
+++ src/lib/krb5/asn.1/ldap_key_seq.c (working copy)
@@ -341,7 +341,8 @@
if (asn1buf_remains(&slt, 0) != 0) { /* Salt value is optional */
ret = decode_tagged_octetstring (&slt, 1, &keylen,
&key->key_data_contents[1]); checkerr;
- }
+ } else
+ keylen = 0;
safe_syncbuf (&subbuf, &slt);
key->key_data_length[1] = keylen; /* XXX range check?? */