Skip to content

Commit

Permalink
Merge pull request rust-lang#3332 from rchaser53/issue-3234
Browse files Browse the repository at this point in the history
add issue-3234 test
  • Loading branch information
topecongiro authored Feb 8, 2019
2 parents 672f352 + 5e53098 commit 44d6f7c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/source/issue-3234.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
macro_rules! fuzz_target {
(|$data:ident: &[u8]| $body:block) => {};
}

fuzz_target!(|data: &[u8]| {

if let Ok(app_img) = AppImage::parse(data) {
if let Ok(app_img) = app_img.sign_for_secureboot(include_str!("../../test-data/signing-key")) {
assert!(app_img.is_signed());
Gbl::from_app_image(app_img).to_bytes();
}
}

});
14 changes: 14 additions & 0 deletions tests/target/issue-3234.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
macro_rules! fuzz_target {
(|$data:ident: &[u8]| $body:block) => {};
}

fuzz_target!(|data: &[u8]| {
if let Ok(app_img) = AppImage::parse(data) {
if let Ok(app_img) =
app_img.sign_for_secureboot(include_str!("../../test-data/signing-key"))
{
assert!(app_img.is_signed());
Gbl::from_app_image(app_img).to_bytes();
}
}
});

0 comments on commit 44d6f7c

Please sign in to comment.