Commit 36c4a678 authored by Paul Bakker's avatar Paul Bakker
Browse files

- Fixed off-by-one loop

parent c893e025
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment