mirror of
https://github.com/Momoko-Ayase/Senbei.git
synced 2026-11-24 02:52:47 +08:00
test: add bounded fuzz targets and native-WASM parity
This commit is contained in:
1 parent
e0dc177885
commit
767eae2a79
14 files changed
+1111
-3
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#![no_main]
|
||||
|
||||
//! il2cpp metadata parsing (structural transform and seed discovery).
|
||||
//!
|
||||
//! Input is capped at 2 MiB: real metadata is large, but a fuzz corpus of
|
||||
//! multi-megabyte blobs slows iteration without reaching new code, and the
|
||||
//! parser's bounds checks are index-driven, not size-driven.
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
const MAX_INPUT: usize = 2 * 1024 * 1024;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let data = &data[..data.len().min(MAX_INPUT)];
|
||||
let _ = senbei_metadata::is_metadata(data);
|
||||
let _ = senbei_metadata::deobfuscate(data);
|
||||
let _ = senbei_metadata::android::discover_method_token_seeds(data);
|
||||
});
|
||||
Reference in new issue
Block a user