From: Ken Raeburn Date: Tue, 10 Oct 2006 23:40:55 +0000 (+0000) Subject: Check for allocation failure. Caught by Will Fiveash X-Git-Tag: krb5-1.6-alpha1~81 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e05f37d60a4de607d01486ce95ed5dab96a261a;p=krb5.git Check for allocation failure. Caught by Will Fiveash git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18672 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 68a93554d..c77c51c03 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); }