mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
- Fixed off-by-one loop
This commit is contained in:
@@ -194,7 +194,7 @@ int ctr_drbg_update_internal( ctr_drbg_context *ctx,
|
||||
/*
|
||||
* Increase counter
|
||||
*/
|
||||
for( i = CTR_DRBG_BLOCKSIZE; i >= 0; i-- )
|
||||
for( i = CTR_DRBG_BLOCKSIZE; i > 0; i-- )
|
||||
if( ++ctx->counter[i - 1] != 0 )
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user