From: Kurt Roeckx Date: Sat, 4 Jun 2016 17:52:28 +0000 (+0200) Subject: Avoid creating an illegal pointer. X-Git-Tag: OpenSSL_1_1_0-pre6~491 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8c918b7b9c93ba38790ffd1a83e23c3684e66f57;p=oweals%2Fopenssl.git Avoid creating an illegal pointer. Found by tis-interpreter Reviewed-by: Rich Salz GH: #1166 --- 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) {