From 998a358529faac5b6bfded2d79590bdf2d610579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 18 Dec 2018 10:03:13 +0100 Subject: [PATCH] Make a check more explicit in aes.c The check was already done later when calling ECB, (as evidenced by the tests passing, which have a call with data_unit set to NULL), but it's more readable to have it here too, and more helpful when debugging. --- library/aes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/library/aes.c b/library/aes.c index e48a2a6ec..f6dc9963e 100644 --- a/library/aes.c +++ b/library/aes.c @@ -1183,6 +1183,7 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx, AES_VALIDATE_RET( ctx != NULL ); AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT || mode == MBEDTLS_AES_DECRYPT ); + AES_VALIDATE_RET( data_unit != NULL ); AES_VALIDATE_RET( input != NULL ); AES_VALIDATE_RET( output != NULL );