1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-02 07:35:08 +02:00

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:
Tyler Zars
2025-09-18 19:00:02 -04:00
committed by GitHub
parent b23e19ecd4
commit 3bde692976
5 changed files with 47 additions and 18 deletions

View File

@@ -29,7 +29,7 @@
#endif
ssize_t recv_count;
uint8_t recv_buffer[256] = {0};
uint8_t recv_buffer[MAX_RECV_BUF_LEN] = {0};
uint32_t world_seed = INITIAL_WORLD_SEED;
uint32_t rng_seed = INITIAL_RNG_SEED;