-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
secblock.h: Error inside assert() #92
Comments
Thanks Alan.
Yeah, you're right. I'm not sure why that was not caught with cryptest.sh (or one of the other Debug build tests). Would you mind providing a Pull Request? If you provide the pull request, we can ensure you receive credit at Contributors. If not, I can check-in a fix. Thanks again. |
Sorry, I don't really feel I can do that; it would be potentially complex. I'd be grateful if you would go ahead and fix it. |
No problem. By the way... I checked the original code before I changed it. You can see it at secblock.h from 5.6.2. Ignoring the assert typos (which are valid findings...), the old and existing code performs the following:
It would work fine under the following condition:
_If_ we perform:
Then the code breaks because the We need to rework this code and get test cases in place to catch problems like it in the future. We may need to release 5.6.4 because of it, too. We cannot guarantee clients are not doing the Good find. Thanks for bringing it up. |
Here's the test case I used while examining the Stack Overflow question.
|
And here's the patch I'm looking at:
|
Fixed at commit 605744d |
Now related: Need a Code Coverage tool added to the Release Process. |
Line 569 and 589 of secblock.h contain this:
m_ptr.m_size
doesn't work, sincem_ptr
is a pointer. I believe what is meant isThis prevents use of operators +=
and
+` in a debug build (i.e. with assertions not disabled).The text was updated successfully, but these errors were encountered: