mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-11-09 14:50:17 +08:00
remove duplicate chacha20_check_counter_wrap functionality in chacha20 and chacha20_neon
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
parent
0e9be79ea3
commit
130b914ff2
@ -233,7 +233,8 @@ static int chacha20_check_counter_wrap(const mbedtls_chacha20_context *ctx,
|
||||
needed_blocks++;
|
||||
}
|
||||
|
||||
if (needed_blocks > (uint64_t) CHACHA20_MAX_BLOCKS + 1 - ctx->state[CHACHA20_CTR_INDEX]) {
|
||||
if (needed_blocks >
|
||||
(uint64_t) CHACHA20_MAX_BLOCKS + 1U - ctx->state[CHACHA20_CTR_INDEX]) {
|
||||
return MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user