diff options
author | Ken Raeburn <raeburn@mit.edu> | 2006-10-10 23:40:55 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2006-10-10 23:40:55 +0000 |
commit | 7e05f37d60a4de607d01486ce95ed5dab96a261a (patch) | |
tree | cf9d1a4964cf899eb58f555529f7b3b78e6ff722 /src/lib/krb5/asn.1/ldap_key_seq.c | |
parent | 22e3a79c4a67cfc3e4d7eb628ce84aa0497a061e (diff) | |
download | krb5-7e05f37d60a4de607d01486ce95ed5dab96a261a.zip krb5-7e05f37d60a4de607d01486ce95ed5dab96a261a.tar.gz krb5-7e05f37d60a4de607d01486ce95ed5dab96a261a.tar.bz2 |
Check for allocation failure. Caught by Will Fiveash
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18672 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1/ldap_key_seq.c')
-rw-r--r-- | src/lib/krb5/asn.1/ldap_key_seq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/krb5/asn.1/ldap_key_seq.c b/src/lib/krb5/asn.1/ldap_key_seq.c index 68a9355..c77c51c 100644 --- a/src/lib/krb5/asn.1/ldap_key_seq.c +++ b/src/lib/krb5/asn.1/ldap_key_seq.c @@ -144,7 +144,8 @@ asn1_encode_sequence_of_keys (krb5_key_data *key_data, if (n_key_data == 0) cleanup (ASN1_MISSING_FIELD); /* Allocate the buffer */ - asn1buf_create(&buf); + ret = asn1buf_create(&buf); + checkerr; /* Sequence of keys */ { @@ -360,7 +361,7 @@ static asn1_error_code asn1_decode_key(asn1buf *buf, krb5_key_data *key) ret = decode_tagged_octetstring (&kbuf, 1, &ival, &key->key_data_contents[0]); checkerr; - key->key_data_length[0] = ival; + key->key_data_length[0] = ival; /* XXX range check? */ safe_syncbuf (&subbuf, &kbuf); } |