mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-04 02:24:12 +02:00
additional hardening against mallformed demos
This commit is contained in:
parent
968cc80bee
commit
a7a46384ce
4 changed files with 45 additions and 9 deletions
|
|
@ -414,7 +414,7 @@ pub fn parse_string_table_update<'a>(
|
|||
|
||||
for _ in 0..entry_count {
|
||||
let index = if stream.read()? {
|
||||
(last_entry + 1) as u16
|
||||
last_entry.saturating_add(1) as u16
|
||||
} else {
|
||||
stream.read_sized(entry_bits as usize)?
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue