diff options
author | Pauli <ppzgs1@gmail.com> | 2021-03-22 12:09:19 +1000 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-03-24 09:12:43 +1000 |
commit | 1634b2df9f12d3976129ba49e38638e3ab368e3d (patch) | |
tree | 946791596a0e09bb9b04f0f8065b1fb9831e36b5 /crypto/idea/i_cfb64.c | |
parent | fe10fa75216cb0e81eeee9bced2b4d26e05bf9e7 (diff) |
enc: fix coverity 1451499, 1451501, 1451506, 1451507, 1351511, 1451514, 1451517, 1451523, 1451526m 1451528, 1451539, 1451441, 1451549, 1451568 & 1451572: improper use of negative value
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14638)
Diffstat (limited to 'crypto/idea/i_cfb64.c')
-rw-r--r-- | crypto/idea/i_cfb64.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/idea/i_cfb64.c b/crypto/idea/i_cfb64.c index b9db1639cf..a477799edf 100644 --- a/crypto/idea/i_cfb64.c +++ b/crypto/idea/i_cfb64.c @@ -33,6 +33,11 @@ void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out, unsigned long ti[2]; unsigned char *iv, c, cc; + if (n < 0) { + *num = -1; + return; + } + iv = (unsigned char *)ivec; if (encrypt) { while (l--) { |