mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-22 05:46:41 +01:00
- Fixed off-by-one loop
This commit is contained in:
parent
c893e0257f
commit
36c4a678a6
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ int ctr_drbg_update_internal( ctr_drbg_context *ctx,
|
||||||
/*
|
/*
|
||||||
* Increase counter
|
* Increase counter
|
||||||
*/
|
*/
|
||||||
for( i = CTR_DRBG_BLOCKSIZE; i >= 0; i-- )
|
for( i = CTR_DRBG_BLOCKSIZE; i > 0; i-- )
|
||||||
if( ++ctx->counter[i - 1] != 0 )
|
if( ++ctx->counter[i - 1] != 0 )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue