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

assert makes incorrect assumption #2298

Closed
zoff99 opened this issue Apr 17, 2022 · 0 comments · Fixed by #2299
Closed

assert makes incorrect assumption #2298

zoff99 opened this issue Apr 17, 2022 · 0 comments · Fixed by #2299
Assignees
Milestone

Comments

@zoff99
Copy link

zoff99 commented Apr 17, 2022

assert(count >= 0 && count <= UINT16_MAX);

count is often larger than UINT16_MAX, and then toxcore crashes.
i do not know if there is a bigger issue here with truncating "count" down to UINT16_MAX aswell.

this used to be "size_t":

size_t net_socket_data_recv_buffer(Socket sock)

some refactoring was not correct after v0.2.13

This issue 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 a pull request may close this issue.

2 participants