remove build-id from control version and reject inputs with it

This commit is contained in:
John Turner
2025-11-21 02:25:22 +00:00
parent 3bce987993
commit bf56ed1c61

View File

@@ -40,7 +40,7 @@ pub unsafe extern "C" fn LLVMFuzzerTestOneInput(input: *const u8, len: usize) ->
});
let control = Version::parser()
.parse_finished(InputIter::new("1.2.0a_alpha1_beta2-r1-8"))
.parse_finished(InputIter::new("1.2.0a_alpha1_beta2-r1"))
.unwrap();
let slice = unsafe { slice::from_raw_parts(input, len) };
@@ -64,6 +64,10 @@ pub unsafe extern "C" fn LLVMFuzzerTestOneInput(input: *const u8, len: usize) ->
Err(_) => return -1,
};
if version.build_id().is_some() {
return -1;
}
let gentoo_utils = control.cmp(&version);
let portage_result = portage_vercmp(&PY_PROCESS, &control, &version);