We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7610b4e + 16aab18 commit 17f3da1Copy full SHA for 17f3da1
wolfcrypt/src/random.c
@@ -1342,6 +1342,8 @@ static int Entropy_HealthTest_Proportion(byte noise)
1342
prop_last = (prop_last + 1) % PROP_WINDOW_SIZE;
1343
/* Added sample to queue - add count. */
1344
prop_cnt[noise]++;
1345
+ /* Update count of store values. */
1346
+ prop_total++;
1347
1348
/* Check whether first value has too many repetitions in queue. */
1349
if (prop_cnt[noise] >= PROP_CUTOFF) {
@@ -1360,6 +1362,8 @@ static int Entropy_HealthTest_Proportion(byte noise)
1360
1362
prop_first = (prop_first + 1) % PROP_WINDOW_SIZE;
1361
1363
/* Removed first sample from queue - remove count. */
1364
prop_cnt[val]--;
1365
1366
+ prop_total--;
1367
}
1368
1369
0 commit comments