Skip to content
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

Improved overflow checker code #2767

Closed
wants to merge 3 commits into from

Conversation

mulle-nat
Copy link
Contributor

I think you will like this much better. The other code was more or less a mitigation but this should be a better overflow checker. The multiplication does the zero check and the comparison checks that the multiplication doesn't overflow. calloc will then do the other overflow check.

@mulle-nat
Copy link
Contributor Author

Not sure why the other commits are in here again. Will try to fix this tomorrow.

@dankamongmen
Copy link
Owner

i definitely feel the notcurses.c change to be improved (though I thought we'd already merged it? where's my brain these days?)

@mulle-nat
Copy link
Contributor Author

Closing this as #2768 is the better, mergable of it.

@mulle-nat mulle-nat closed this Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants