Closed joshuaehill closed 1 year ago
After looking reviewing the OpenSSL deprecated API set, I think that there is a way to accomplish this task in a way that is similar to the prior approach (which required a much smaller buffer). I've updated the PR to use this parallel approach.
I also caught a few other problems (Issues #211 and #210) and included the fixes for these problems here as well.
@celic If you would prefer that I make distinct pull requests, let me know.
These bugs were introduced in 43f759db4751655ecc0f3d995ccbae9d6d5ff4e3
There were a few issues:
fileLength
andfileLen
to mean the same thing. This PR includes the fix proposed by @Zalamar in usnistgov/SP800-90B_EntropyAssessment#202const
was used incorrectly;buffer
was declared to be a pointer to a constant region, which then was changed. In this case, the pointer is fixed, but the value being pointed to is changed.buffer
array was larger than it needed to be. (This buffer is not a c string, so there is no trailing null character).I propose that future changes be compiled and run on data at least once prior to checking in the code, particularly when the code is going into the master branch.
Resolves usnistgov/SP800-90B_EntropyAssessment#203 Resolves usnistgov/SP800-90B_EntropyAssessment#205 Resolves usnistgov/SP800-90B_EntropyAssessment#206 Resolves usnistgov/SP800-90B_EntropyAssessment#210 Resolves usnistgov/SP800-90B_EntropyAssessment#211