From 5ab8973a1cc1d09ec56687b2faeaa4ceaf672da8 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 1 Jul 1999 00:38:28 +0000 Subject: [PATCH] * asn1buf.c (asn1buf_sync): Interim fix for DCE compat problem with indefinite length encodings. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11540 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/asn.1/ChangeLog | 5 +++++ src/lib/krb5/asn.1/asn1buf.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index caeecfe63..33940ce20 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,8 @@ +1999-06-30 Tom Yu + + * asn1buf.c (asn1buf_sync): Interim fix for DCE compat problem + with indefinite length encodings. + 1999-06-15 Tom Yu * asn1_encode.c (asn1_encode_generaltime): Fix minor bug in diff --git a/src/lib/krb5/asn.1/asn1buf.c b/src/lib/krb5/asn.1/asn1buf.c index 52ac387d5..785b14091 100644 --- a/src/lib/krb5/asn.1/asn1buf.c +++ b/src/lib/krb5/asn.1/asn1buf.c @@ -93,7 +93,15 @@ void asn1buf_sync(buf, subbuf) asn1buf * buf; asn1buf * subbuf; { - buf->next = subbuf->bound + 1; + if (subbuf->bound != buf->bound) { + buf->next = subbuf->bound + 1; + } else { + /* + * indefinite length; this will suck + * XXX - need to skip fields somehow + */ + buf->next = subbuf->next; + } } asn1_error_code asn1buf_destroy(buf) -- 2.26.2