Fix an error with the opcode decoder (sig)
This commit is contained in:
parent
e1dbc56a32
commit
35fc0bc549
1 changed files with 2 additions and 2 deletions
|
@ -60,9 +60,9 @@ impl Decoder for OpcodeDecoder {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
let sig_size: u16 = (src[5] as u16) << 8 | (src[6] as u16);
|
let sig_size: u16 = u16::from_be_bytes(src[5..6].try_into().unwrap());
|
||||||
|
|
||||||
if usize::from(sig_size) > src.len() {
|
if (usize::from(sig_size) + 7) > src.len() {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue