X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fmodes%2Fwrap128.c;h=c6c14cdaaa06b9845947343543a773c6cd8afafa;hp=18785320f29ffa9a320ff400151f8b5ee58088bd;hb=d12eef15016e49fc09d6c96653c61624e032d1a3;hpb=d48e78f0cf22aaddb563f4bcfccf25b1a45ac8a4 diff --git a/crypto/modes/wrap128.c b/crypto/modes/wrap128.c index 18785320f2..c6c14cdaaa 100644 --- a/crypto/modes/wrap128.c +++ b/crypto/modes/wrap128.c @@ -106,7 +106,7 @@ size_t CRYPTO_128_unwrap(void *key, const unsigned char *iv, unsigned char *A, B[16], *R; size_t i, j, t; inlen -= 8; - if ((inlen & 0x7) || (inlen < 8) || (inlen > CRYPTO128_WRAP_MAX)) + if ((inlen & 0x7) || (inlen < 16) || (inlen > CRYPTO128_WRAP_MAX)) return 0; A = B; t = 6 * (inlen >> 3);