From: Bernd Edlinger Date: Wed, 15 Feb 2017 19:42:40 +0000 (+0100) Subject: Fix a slightly confusing if condition in a2i_ASN1_ENUMERATED. X-Git-Tag: OpenSSL_1_0_2l~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61bdecbdd49faad0c9aed0f3366f1e4ea7f5dc75;p=openssl Fix a slightly confusing if condition in a2i_ASN1_ENUMERATED. Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2641) --- diff --git a/crypto/asn1/f_enum.c b/crypto/asn1/f_enum.c index 94cd54dbee..527f1d8f87 100644 --- a/crypto/asn1/f_enum.c +++ b/crypto/asn1/f_enum.c @@ -138,7 +138,7 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *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; }