|
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
c-toxcore/toxcore/network.c
Line 1794 in 2824aa2
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":
c-toxcore/toxcore/network.c
Line 1468 in 4348b96
some refactoring was not correct after v0.2.13