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:
parent
46a03acd30
commit
cc14c4e5d7
5 changed files with 110 additions and 64 deletions
|
|
@ -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) });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue