diff options
author | Jeremy Allison <jra@samba.org> | 2004-09-15 20:33:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:40 -0500 |
commit | 20e9f051e2fe5867e11988139399bac692112fc6 (patch) | |
tree | 664a41d5fe7a442feff99dc8a6ce32c7ed2ea552 | |
parent | 3a1d169864bbab8860e53c8baeaa02ebde369317 (diff) | |
download | samba-20e9f051e2fe5867e11988139399bac692112fc6.tar.gz samba-20e9f051e2fe5867e11988139399bac692112fc6.tar.bz2 samba-20e9f051e2fe5867e11988139399bac692112fc6.zip |
r2355: Now we've shipped 3.0.7, add in the DOS fix.
Jeremy.
(This used to be commit d6b26f9db76e81d65b7630e46af99fe03a982ec6)
-rw-r--r-- | source3/libsmb/asn1.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c index ca14f3fbb7..2807b4e1d3 100644 --- a/source3/libsmb/asn1.c +++ b/source3/libsmb/asn1.c @@ -219,6 +219,9 @@ BOOL asn1_load(ASN1_DATA *data, DATA_BLOB blob) /* read from a ASN1 buffer, advancing the buffer pointer */ BOOL asn1_read(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) { data->has_error = True; return False; @@ -309,6 +312,9 @@ BOOL asn1_end_tag(ASN1_DATA *data) /* work out how many bytes are left in this nested tag */ int asn1_tag_remaining(ASN1_DATA *data) { + if (data->has_error) + return 0; + if (!data->nesting) { data->has_error = True; return -1; |