From: Ken Raeburn Date: Fri, 27 Jul 2007 04:37:50 +0000 (+0000) Subject: If no salt is included with the key data, set the salt length field to 0. X-Git-Tag: krb5-1.7-alpha1~992 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c00f8b975c88fb2f0e0f475f704b80de46db4fd9;p=krb5.git If no salt is included with the key data, set the salt length field to 0. Bug report and patch from Nalin Dahyabhai. ticket: 5545 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19733 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/ldap_key_seq.c b/src/lib/krb5/asn.1/ldap_key_seq.c index 1fe9a548f..b910e721d 100644 --- a/src/lib/krb5/asn.1/ldap_key_seq.c +++ b/src/lib/krb5/asn.1/ldap_key_seq.c @@ -341,7 +341,8 @@ static asn1_error_code asn1_decode_key(asn1buf *buf, krb5_key_data *key) 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?? */