mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
fix coverity 1485660 improper use of negative value
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15635)
This commit is contained in:
parent
37bbe44929
commit
6c1d17c802
@ -457,7 +457,12 @@ padlock_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out_arg,
|
||||
const unsigned char *in_arg, size_t nbytes)
|
||||
{
|
||||
struct padlock_cipher_data *cdata = ALIGNED_CIPHER_DATA(ctx);
|
||||
unsigned int num = EVP_CIPHER_CTX_get_num(ctx);
|
||||
int n = EVP_CIPHER_CTX_get_num(ctx);
|
||||
unsigned int num;
|
||||
|
||||
if (n < 0)
|
||||
return 0;
|
||||
num = (unsigned int)n;
|
||||
|
||||
CRYPTO_ctr128_encrypt_ctr32(in_arg, out_arg, nbytes,
|
||||
cdata, EVP_CIPHER_CTX_iv_noconst(ctx),
|
||||
|
Loading…
Reference in New Issue
Block a user