1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Add parameter validation for AES-OFB

This commit is contained in:
Manuel Pégourié-Gonnard
2018-12-13 11:00:56 +01:00
parent 1677cca54b
commit 8e41eb7187
3 changed files with 32 additions and 1 deletions

View File

@ -1382,7 +1382,15 @@ int mbedtls_aes_crypt_ofb( mbedtls_aes_context *ctx,
unsigned char *output )
{
int ret = 0;
size_t n = *iv_off;
size_t n;
AES_VALIDATE_RET( ctx != NULL );
AES_VALIDATE_RET( iv_off != NULL );
AES_VALIDATE_RET( iv != NULL );
AES_VALIDATE_RET( input != NULL );
AES_VALIDATE_RET( output != NULL );
n = *iv_off;
while( length-- )
{