Author: metze
Date: 2004-08-17 10:04:25 +0000 (Tue, 17 Aug 2004)
New Revision: 1851

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=1851&nolog=1

Log:
if we try to peek a subtag, check if the parent tag has remaining data

metze

Modified:
   branches/SAMBA_4_0/source/libcli/util/asn1.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/util/asn1.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/util/asn1.c        2004-08-17 10:02:54 UTC (rev 
1850)
+++ branches/SAMBA_4_0/source/libcli/util/asn1.c        2004-08-17 10:04:25 UTC (rev 
1851)
@@ -264,6 +264,10 @@
 {
        uint8_t b;
 
+       if (asn1_tag_remaining(data) <= 0) {
+               return False;
+       }
+
        if (!asn1_peek(data, &b, sizeof(b)))
                return False;
 

Reply via email to