From db7d7a866e96cf0d068e131df9a2127e9794a513 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Sat, 30 Sep 2017 13:37:06 +0200 Subject: [PATCH] Revert "fix bit-length check in der_decode_raw_bit_string()" This reverts commit 2b8d83ff93da0764f19f494de0a8211515428cef. --- src/pk/asn1/der/bit/der_decode_raw_bit_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pk/asn1/der/bit/der_decode_raw_bit_string.c b/src/pk/asn1/der/bit/der_decode_raw_bit_string.c index 18fb829..223899b 100644 --- a/src/pk/asn1/der/bit/der_decode_raw_bit_string.c +++ b/src/pk/asn1/der/bit/der_decode_raw_bit_string.c @@ -78,7 +78,7 @@ int der_decode_raw_bit_string(const unsigned char *in, unsigned long inlen, blen = ((dlen - 1) << 3) - (in[x++] & 7); /* too many bits? */ - if (blen/8 > *outlen) { + if (blen > *outlen) { *outlen = blen; return CRYPT_BUFFER_OVERFLOW; }