From 69d643535837bc23d8f7274ce476cf803b45969b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 17 Aug 2004 10:04:25 +0000 Subject: r1851: if we try to peek a subtag, check if the parent tag has remaining data metze (This used to be commit 01626ed381bdc9cab3e94e80220c916bb61acf30) --- source4/libcli/util/asn1.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/libcli/util') diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c index 6dc459d59d..e7c38b2803 100644 --- a/source4/libcli/util/asn1.c +++ b/source4/libcli/util/asn1.c @@ -264,6 +264,10 @@ BOOL asn1_peek_tag(ASN1_DATA *data, uint8_t tag) { uint8_t b; + if (asn1_tag_remaining(data) <= 0) { + return False; + } + if (!asn1_peek(data, &b, sizeof(b))) return False; -- cgit