mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-10 19:05:44 +00:00
Merge remote-tracking branch 'public/pr/2085' into development-restricted-proposed
This commit is contained in:
commit
bbc31b4827
|
@ -1142,11 +1142,11 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
|
|||
unsigned char prev_tweak[16];
|
||||
unsigned char tmp[16];
|
||||
|
||||
/* Sectors must be at least 16 bytes. */
|
||||
/* Data units must be at least 16 bytes long. */
|
||||
if( length < 16 )
|
||||
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
|
||||
|
||||
/* NIST SP 80-38E disallows data units larger than 2**20 blocks. */
|
||||
/* NIST SP 800-38E disallows data units larger than 2**20 blocks. */
|
||||
if( length > ( 1 << 20 ) * 16 )
|
||||
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
|
||||
|
||||
|
|
Loading…
Reference in a new issue