From: Bernd Edlinger Date: Wed, 15 Feb 2017 19:01:53 +0000 (+0100) Subject: Fix a slightly confusing if condition in a2i_ASN1_INTEGER. X-Git-Tag: OpenSSL_1_1_0f~231 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=38c0fe4b19ef2c5f4c7302c75d62b506e4d55c9e;p=oweals%2Fopenssl.git Fix a slightly confusing if condition in a2i_ASN1_INTEGER. Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2640) (cherry picked from commit aa402e2ba408254c052b5750b14e7f01e48bced1) --- diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c index 51fc884b5e..ec556c92dc 100644 --- a/crypto/asn1/f_int.c +++ b/crypto/asn1/f_int.c @@ -103,7 +103,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) bufp = (unsigned char *)buf; if (first) { first = 0; - if ((bufp[0] == '0') && (buf[1] == '0')) { + if ((bufp[0] == '0') && (bufp[1] == '0')) { bufp += 2; i -= 2; }