Skip to content

assert makes incorrect assumption #2298

@zoff99

Description

@zoff99

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions