mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
Fix saturating overflow in ExtraData parsing
- Fix overflow in ExtraData by casting byte_len to usize before multiplication. This was previously multiplying a u16 with saturating_mul and would overflow when the extra data in string tables reaches a certain size. - Add test case for parsing large string table to verify correct stream position after read.
This commit is contained in:
parent
d9b711add6
commit
624efb6427
4 changed files with 26 additions and 2 deletions
BIN
test_data/string_tables/ServerMapCycleLarge.bin
Normal file
BIN
test_data/string_tables/ServerMapCycleLarge.bin
Normal file
Binary file not shown.
4
test_data/string_tables/ServerMapCycleLarge_meta.json
Normal file
4
test_data/string_tables/ServerMapCycleLarge_meta.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "ServerMapCycle",
|
||||
"marker": 4039822362
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue