This commit implements the Cargo.lock policy for reproducible builds across all workspace members (pdftract-core, pdftract-cli, pdftract-py). Changes: - Add CONTRIBUTING.md with lockfile-update workflow documentation - Add .renovaterc.json for weekly lockfile-only PRs (human-gated) - Add crates/pdftract-core/README.md with rationale for checked-in lockfiles - Add notes/pdftract-49f8.md with verification note The Argo workflow updates (pdftract-ci.yaml) are committed separately in the declarative-config repo. Acceptance criteria: - PASS: Cargo.lock tracked by git, not in .gitignore - PASS: Argo workflow templates document --locked/--frozen requirements - WARN: Enforcement to be completed when placeholder templates are implemented - WARN: Binary reproducibility verification deferred to pdftract-build-binaries implementation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
29 lines
793 B
Rust
29 lines
793 B
Rust
//! Fuzz target for the PDF object parser.
|
|
//!
|
|
//! This target tests INV-8 (no panic at public boundary) for the object parser.
|
|
//! Any panic indicates an object parser bug that must be fixed.
|
|
|
|
#![no_main]
|
|
use libfuzzer_sys::fuzz_target;
|
|
|
|
fuzz_target!(|data: &[u8]| {
|
|
use pdftract_core::parser::object::ObjectParser;
|
|
|
|
// The object parser must never panic on any input
|
|
let mut parser = ObjectParser::new(data);
|
|
|
|
// Test parse_direct_object
|
|
loop {
|
|
match parser.parse_direct_object() {
|
|
Some(_) => continue,
|
|
None => break,
|
|
}
|
|
}
|
|
|
|
// Also test parse_indirect_object
|
|
let mut parser2 = ObjectParser::new(data);
|
|
let _ = parser2.parse_indirect_object();
|
|
|
|
// Test take_diagnostics
|
|
let _ = parser.take_diagnostics();
|
|
});
|