commit | 8e41eb718727b7bdfcd8fb96afa412d98a9267ea | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | Thu Dec 13 11:00:56 2018 +0100 |
committer | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | Tue Dec 18 12:22:40 2018 +0100 |
tree | 5afb4e7aec158872c59a96b1d3da8ed9aaf7e770 | |
parent | 1677cca54b51f0c82c6ec24825443ae0fc592a1f [diff] [blame] |
Add parameter validation for AES-OFB
diff --git a/library/aes.c b/library/aes.c index b705290..52fc74c 100644 --- a/library/aes.c +++ b/library/aes.c
@@ -1382,7 +1382,15 @@ 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-- ) {