mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-03 16:44:11 +02:00
fmt
This commit is contained in:
parent
c55dec1b4f
commit
f4f173c84e
11 changed files with 134 additions and 52 deletions
1
fuzz/.envrc
Normal file
1
fuzz/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
5
fuzz/.gitignore
vendored
Normal file
5
fuzz/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
target
|
||||
corpus
|
||||
artifacts
|
||||
.direnv
|
||||
result
|
||||
25
fuzz/Cargo.toml
Normal file
25
fuzz/Cargo.toml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[package]
|
||||
name = "vmdl-fuzz"
|
||||
version = "0.0.0"
|
||||
authors = ["Automatically generated"]
|
||||
publish = false
|
||||
edition = "2018"
|
||||
|
||||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies]
|
||||
libfuzzer-sys = "0.4"
|
||||
|
||||
[dependencies.vmdl]
|
||||
path = ".."
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
[workspace]
|
||||
members = ["."]
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_target_1"
|
||||
path = "fuzz_targets/fuzz_target_1.rs"
|
||||
test = false
|
||||
doc = false
|
||||
22
fuzz/flake.nix
Normal file
22
fuzz/flake.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
inputs = {
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "nixpkgs/release-22.11";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
utils,
|
||||
}:
|
||||
utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = (import nixpkgs) {
|
||||
inherit system;
|
||||
};
|
||||
in rec {
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [rustup cargo-edit cargo-fuzz];
|
||||
};
|
||||
});
|
||||
}
|
||||
6
fuzz/fuzz_targets/mdl.rs
Normal file
6
fuzz/fuzz_targets/mdl.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
// fuzzed code goes here
|
||||
});
|
||||
8
fuzz/fuzz_targets/vtx.rs
Normal file
8
fuzz/fuzz_targets/vtx.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fn fuzz(data: &[u8]) {
|
||||
let _ = vmdl::Mdl::read(data).ok();
|
||||
}
|
||||
|
||||
fuzz_target!(|data: &[u8]| {fuzz(data)});
|
||||
8
fuzz/fuzz_targets/vvd.rs
Normal file
8
fuzz/fuzz_targets/vvd.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fn fuzz(data: &[u8]) {
|
||||
let _ = vmdl::Mdl::read(data).ok();
|
||||
}
|
||||
|
||||
fuzz_target!(|data: &[u8]| {fuzz(data)});
|
||||
Loading…
Add table
Add a link
Reference in a new issue