projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Avoid creating an illegal pointer.
[openssl.git]
/
crypto
/
asn1
/
asn1_par.c
diff --git
a/crypto/asn1/asn1_par.c
b/crypto/asn1/asn1_par.c
index 51da0143aa2e05afb8d3fd2ddd381957da175628..1e17895f264307f6fe9f4a996922c07ece4d30f2 100644
(file)
--- a/
crypto/asn1/asn1_par.c
+++ b/
crypto/asn1/asn1_par.c
@@
-86,8
+86,7
@@
static int asn1_parse2(BIO *bp, const unsigned char **pp, long length,
dump_indent = 6; /* Because we know BIO_dump_indent() */
p = *pp;
tot = p + length;
- op = p - 1;
- while ((p < tot) && (op < p)) {
+ while (length > 0) {
op = p;
j = ASN1_get_object(&p, &len, &tag, &xclass, length);
if (j & 0x80) {