Skip to content

Commit 32f3dc3

Browse files
authored
RUST-1850 Fix a fuzzer failure (#460)
1 parent 1f68823 commit 32f3dc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/de/raw.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,14 +1316,14 @@ impl<'de, 'a> CodeWithScopeDeserializer<'de, 'a> {
13161316
F: FnOnce(&mut Self) -> Result<O>,
13171317
{
13181318
let start_bytes = self.root_deserializer.bytes.bytes_read();
1319-
let out = f(self);
1319+
let out = f(self)?;
13201320
let bytes_read = self.root_deserializer.bytes.bytes_read() - start_bytes;
13211321
self.length_remaining -= bytes_read as i32;
13221322

13231323
if self.length_remaining < 0 {
13241324
return Err(Error::custom("length of CodeWithScope too short"));
13251325
}
1326-
out
1326+
Ok(out)
13271327
}
13281328
}
13291329

0 commit comments

Comments
 (0)