mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
r25212: merge some stuff from samba3
metze
This commit is contained in:
parent
c0d095c8c9
commit
502251451a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user