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:
@@ -102,6 +102,9 @@
|
||||
// clients from Keep Alive packets.
|
||||
#define NETWORK_TIMEOUT_TIME 15000000
|
||||
|
||||
// Size of the receive buffer for incoming string data
|
||||
#define MAX_RECV_BUF_LEN 256
|
||||
|
||||
// If defined, sends the server brand to clients. Doesn't do much, but will
|
||||
// show up in the top-left of the F3/debug menu, in the Minecraft client.
|
||||
// You can change the brand string in the "brand" variable in src/globals.c
|
||||
|
Reference in New Issue
Block a user