1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-03 10:44:07 +02:00

some more sub-neighbour rework

This commit is contained in:
Robin Appelman 2022-12-23 23:51:29 +01:00
commit cc14c4e5d7
5 changed files with 110 additions and 64 deletions

View file

@ -1,8 +1,16 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
fn fuzz(data: &[u8]) {
let _ = vbsp::Bsp::read(data);
if let Some(bsp) = vbsp::Bsp::read(data).ok() {
let verts: Vec<_> = bsp
.vertices
.iter()
.map(|vertex| vertex.position.x)
.collect();
assert!(verts.len() > 1);
}
}
fuzz_target!(|data: &[u8]| { fuzz(data) });