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

Fix out of bounds read in error case in messenger_test. #730

Merged
merged 1 commit into from
Jan 26, 2018

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Jan 25, 2018

Also got rid of a VLA. They are overused a bit in toxcore.


This change is Reviewable

@iphydf iphydf added this to the v0.2.0 milestone Jan 25, 2018
@robinlinden
Copy link
Member

:lgtm_strong:


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

Also got rid of two VLAs. They are overused a bit in toxcore. In
irc_syncbot, the array was uninitialised and then filled by a recv system
call. This can cause uninitialised reads if recv doesn't fill the entire
array. It could not cause out of bounds read directly, because a
NUL-terminator was in place, but both cases are undefined behaviour.
@iphydf iphydf merged commit 9c03439 into TokTok:master Jan 26, 2018
@iphydf iphydf deleted the nul-terminator branch January 26, 2018 02:17
This pull request was closed.
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.

2 participants