mirror of
https://github.com/chenxiaolong/avbroot.git
synced 2026-06-02 06:23:34 +02:00
Add support for packing and unpacking logical partition images
This supports both empty and normal LP images, including those that span multiple files/devices. Currently, repacked files are semantically equivalent, but not exactly identical. avbroot's data structure for the metadata does not preserve the arbitrary partition ordering of the LP image. Instead, to make the API a bit nicer, it only preserves the relative partition ordering within partition groups. Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#[cfg(not(windows))]
|
||||
mod fuzz {
|
||||
use std::io::Cursor;
|
||||
|
||||
use avbroot::{format::lp::Metadata, stream::FromReader};
|
||||
use honggfuzz::fuzz;
|
||||
|
||||
pub fn main() {
|
||||
loop {
|
||||
fuzz!(|data: &[u8]| {
|
||||
let reader = Cursor::new(data);
|
||||
let _ = Metadata::from_reader(reader);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(not(windows))]
|
||||
fuzz::main();
|
||||
}
|
||||
Reference in New Issue
Block a user