diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2016-06-04 19:52:28 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2016-06-11 16:43:48 +0200 |
commit | 8c918b7b9c93ba38790ffd1a83e23c3684e66f57 (patch) | |
tree | 6a049d9716cccc9b4d740e4ecb765a24dd7f4569 /crypto | |
parent | 3892b95750b6aa5ed4328a287068f7cdfb9e55bc (diff) | |
download | openssl-8c918b7b9c93ba38790ffd1a83e23c3684e66f57.tar.gz |
Avoid creating an illegal pointer.
Found by tis-interpreter
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #1166
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/asn1_par.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/asn1/asn1_par.c b/crypto/asn1/asn1_par.c index 51da0143aa..1e17895f26 100644 --- 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) { |