mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
fix panics with misformed demos and incorrect length values
This commit is contained in:
parent
f5504cd682
commit
e77770c780
5 changed files with 502 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ pub struct PreFetchMessage {
|
|||
pub struct MenuMessage {
|
||||
pub kind: u16,
|
||||
pub length: u16,
|
||||
#[size = "length * 8"]
|
||||
#[size = "length.saturating_mul(8)"]
|
||||
pub index: Stream,
|
||||
}
|
||||
|
||||
|
|
@ -111,6 +111,6 @@ pub struct GetCvarValueMessage {
|
|||
#[endianness = "LittleEndian"]
|
||||
pub struct CmdKeyValuesMessage {
|
||||
pub length: u32,
|
||||
#[size = "length * 8"]
|
||||
#[size = "length.saturating_mul(8)"]
|
||||
pub data: Stream,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue