forked from EXTERNAL/bareiron
implement recv_buffer size limit and input validation
* Implement recv_buffer size limit and input validation * Add readLengthPrefixedData helper and refactor some read flows * Change error to be more accurate * Add newline to error message * fix long chat messages kicking clients * style nitpicks --------- Co-authored-by: p2r3 <p2r3@p2r3.com> Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,9 @@ int64_t readInt64 (int client_fd);
|
||||
float readFloat (int client_fd);
|
||||
double readDouble (int client_fd);
|
||||
|
||||
ssize_t readLengthPrefixedData (int client_fd);
|
||||
void readString (int client_fd);
|
||||
void readStringN (int client_fd, uint32_t max_length);
|
||||
|
||||
uint32_t fast_rand ();
|
||||
uint64_t splitmix64 (uint64_t state);
|
||||
|
Reference in New Issue
Block a user