feat: Add fuzzing for libsodium allocator

This commit is contained in:
Morgan Hill
2023-12-02 10:43:48 +01:00
committed by Karolin Varner
parent 1eefb5f263
commit 3a0ebd2cbc
4 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use rosenpass_sodium::{
alloc::{Alloc as SodiumAlloc, Box as SodiumBox},
init,
};
fuzz_target!(|data: &[u8]| {
let _ = init();
let _ = SodiumBox::new_in(data, SodiumAlloc::new());
});