usnistgov / SP800-90B_EntropyAssessment

The SP800-90B_EntropyAssessment C++package implements the min-entropy assessment methods included in Special Publication 800-90B.
202 stars 88 forks source link

Bugs in TestRunUtils.h #206

Closed davecornwell58 closed 1 year ago

davecornwell58 commented 1 year ago

There are two bugs in the sha256_file routine in shared/TestRunUtils.h.

The first bug is that there are two variables called fileLen and fileLength when there should only be one - fileLength. Each instance of fileLen needs to be replaced by fileLength.

The second bug is that there are two instances of fclose(file) when there should only be one fclose(file) at the end of the routine. Delete the fclose(file) after the call to sha256_hash_string()

Once these two issues are fixed, the code compiles and runs OK, otherwise it aborts.

Thank you Dave Cornwell

joshuaehill commented 1 year ago

These were also reported in Issue #202 and #203. These are resolved in PR #204.