mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-04 11:04:07 +02:00
verify lump size before reading
This commit is contained in:
parent
9398ea7cf5
commit
65af835320
2 changed files with 11 additions and 0 deletions
|
|
@ -9,6 +9,11 @@ pub enum BspError {
|
|||
UnexpectedHeader(Header),
|
||||
#[error("bsp lump is out of bounds of the bsp file")]
|
||||
LumpOutOfBounds(LumpEntry),
|
||||
#[error("Invalid lump size, lump size {lump_size} is not a multiple of the element size {element_size}")]
|
||||
InvalidLumpSize {
|
||||
element_size: usize,
|
||||
lump_size: usize,
|
||||
},
|
||||
#[error("unexpected length of uncompressed lump, got {got} but expected {expected}")]
|
||||
UnexpectedUncompressedLumpSize { got: u32, expected: u32 },
|
||||
#[error("error while decompressing lump")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue