Skip to content

Commit

Permalink
Do not verify checksum during fuzzing. Allows meaningful fuzzing of o…
Browse files Browse the repository at this point in the history
…gg and lewton crates via rust-fuzz tooling.
  • Loading branch information
Shnatsel committed Jun 20, 2018
1 parent cd84bc9 commit 818731b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl PageParser {
hash_calculated = vorbis_crc32_update(hash_calculated, &packet_data);

// 3. Compare to the extracted one
if self.checksum != hash_calculated {
if (! cfg!(fuzzing)) && self.checksum != hash_calculated {
try!(Err(OggReadError::HashMismatch(self.checksum, hash_calculated)));
}
self.segments_or_packets_buf = packet_data;
Expand Down

0 comments on commit 818731b

Please sign in to comment.