From: Tom Yu Date: Thu, 14 Jul 1994 07:40:07 +0000 (+0000) Subject: * asn1_encode_k.c (asn1_encode_pa_data): oops still check NULL if X-Git-Tag: krb5-1.0-beta4.2~142 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c0936255ab315bd8fafe28b362dfda6b791a6a40;p=krb5.git * asn1_encode_k.c (asn1_encode_pa_data): oops still check NULL if length != 0 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3970 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index c6d64bda3..58699399e 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 14 01:26:22 1994 Tom Yu (tlyu at dragons-lair) + + * asn1_encode_k.c (asn1_encode_pa_data): oops still check NULL if + length != 0 + Sat Jul 9 00:26:48 1994 Tom Yu (tlyu at dragons-lair) * asn1_encode_k.c (asn1_encode_pa_data): the contents field of a diff --git a/src/lib/krb5/asn.1/asn1_encode_k.c b/src/lib/krb5/asn.1/asn1_encode_k.c index 60ea6d5d3..5220c3b2d 100644 --- a/src/lib/krb5/asn.1/asn1_encode_k.c +++ b/src/lib/krb5/asn.1/asn1_encode_k.c @@ -640,7 +640,8 @@ asn1_error_code asn1_encode_pa_data(DECLARG(asn1buf *, buf), { asn1_setup(); - if(val == NULL) return ASN1_MISSING_FIELD; + if(val == NULL || (val->length != 0 && val->contents == NULL)) + return ASN1_MISSING_FIELD; asn1_addlenfield(val->length,val->contents,2,asn1_encode_octetstring); asn1_addfield(val->pa_type,1,asn1_encode_integer);