summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-18 13:31:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:06:54 -0500
commitf35373709444780c4bf338c17b26ce9cc3ebab50 (patch)
treed9c672257457c95d2f4881836481accaaef00360 /source4
parent3864520c9aacafb992f49bd4d3d2cf81f4b6256f (diff)
downloadsamba-f35373709444780c4bf338c17b26ce9cc3ebab50.tar.gz
samba-f35373709444780c4bf338c17b26ce9cc3ebab50.tar.bz2
samba-f35373709444780c4bf338c17b26ce9cc3ebab50.zip
r25212: merge some stuff from samba3
metze (This used to be commit 502251451aa78b82131283d0590b382943b1d156)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/util/asn1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 7e2d54fcbd..f2098de5c5 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -360,6 +360,9 @@ BOOL asn1_load(struct asn1_data *data, DATA_BLOB blob)
/* Peek into an ASN1 buffer, not advancing the pointer */
BOOL asn1_peek(struct asn1_data *data, void *p, int len)
{
+ if (data->has_error)
+ return False;
+
if (len < 0 || data->ofs + len < data->ofs || data->ofs + len < len)
return False;
@@ -405,7 +408,7 @@ BOOL asn1_peek_tag(struct asn1_data *data, uint8_t tag)
return False;
}
- if (!asn1_peek(data, &b, sizeof(b)))
+ if (!asn1_peek_uint8(data, &b))
return False;
return (b == tag);