There was an error while loading. Please reload this page.
1 parent 085aec0 commit 4ad4e5bCopy full SHA for 4ad4e5b
1 file changed
wasm-host/src/data_provider.rs
@@ -104,7 +104,10 @@ pub struct LocatorUnpacker {
104
impl LocatorUnpacker {
105
pub fn from_bytes(buffer: Vec<u8>) -> Option<LocatorUnpacker> {
106
let packed_bytes: usize = buffer.len();
107
- if packed_bytes > LOCATOR_BUFFER_SIZE || packed_bytes == 0 || packed_bytes % 4 != 0 {
+ if packed_bytes > LOCATOR_BUFFER_SIZE
108
+ || packed_bytes == 0
109
+ || !packed_bytes.is_multiple_of(4)
110
+ {
111
None
112
} else {
113
Some(LocatorUnpacker {
0 commit comments