From: Tom Yu Date: Sat, 16 Jul 1994 10:07:08 +0000 (+0000) Subject: * asn1_encode_k.c (asn1_encode_transited_encoding): whoops don't X-Git-Tag: krb5-1.0-beta4.2~122 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=68de221b30d699ae619c0efe6e09017aec7dd328;p=krb5.git * asn1_encode_k.c (asn1_encode_transited_encoding): whoops don't bomb if val->tr_contents.dlength == 0 * asn1_decode_k.c (asn1_decode_encrypted_data): oops looks like Harry made a brain fart here.... default value for kvno was 5, not 0. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3995 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index 03f866479..96b76b4b1 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,12 @@ +Sat Jul 16 00:19:18 1994 Tom Yu (tlyu at dragons-lair) + + * asn1_encode_k.c (asn1_encode_transited_encoding): whoops don't + bomb if val->tr_contents.dlength == 0 + + * asn1_decode_k.c (asn1_decode_encrypted_data): oops looks like + Harry made a brain fart here.... default value for kvno was 5, not + 0. + Thu Jul 14 11:37:59 1994 Theodore Y. Ts'o (tytso at tsx-11) * asn1_*.[ch]: diff --git a/src/lib/krb5/asn.1/asn1_decode_k.c b/src/lib/krb5/asn.1/asn1_decode_k.c index de430b41b..c74a14ccd 100644 --- a/src/lib/krb5/asn.1/asn1_decode_k.c +++ b/src/lib/krb5/asn.1/asn1_decode_k.c @@ -281,7 +281,7 @@ asn1_error_code asn1_decode_encrypted_data(DECLARG(asn1buf *, buf), setup(); { begin_structure(); get_field(val->etype,0,asn1_decode_enctype); - opt_field(val->kvno,1,asn1_decode_kvno,5); + opt_field(val->kvno,1,asn1_decode_kvno,0); get_lenfield(val->ciphertext.length,val->ciphertext.data,2,asn1_decode_charstring); end_structure(); } diff --git a/src/lib/krb5/asn.1/asn1_encode_k.c b/src/lib/krb5/asn.1/asn1_encode_k.c index 41324f851..894ba95a6 100644 --- a/src/lib/krb5/asn.1/asn1_encode_k.c +++ b/src/lib/krb5/asn.1/asn1_encode_k.c @@ -580,7 +580,9 @@ asn1_error_code asn1_encode_transited_encoding(DECLARG(asn1buf *, buf), { asn1_setup(); - if(val == NULL || val->tr_contents.data == NULL) return ASN1_MISSING_FIELD; + if(val == NULL || + (val->tr_contents.length != 0 && val->tr_contents.data == NULL)) + return ASN1_MISSING_FIELD; asn1_addlenfield(val->tr_contents.length,val->tr_contents.data, 1,asn1_encode_charstring);