diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-01-30 23:45:49 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-02-03 05:39:19 +0000 |
commit | 7ccd9ce48e761b7614d29ff95ef97d0a7dc1d599 (patch) | |
tree | d3c1a5f7285ecab2d13040ece2c55108b22a22ea /tests | |
parent | 21aedee1ceab57dcbe8506d10a132dffd3a1917b (diff) | |
download | vboot-7ccd9ce48e761b7614d29ff95ef97d0a7dc1d599.tar.gz |
futility: handle truncated BIOS images without segfault
A truncated BIOS with an otherwise valid FMAP that now points way
off the end of the file shouldn't cause coredumps.
BUG=none
BRANCH=ToT
TEST=make runtests
Change-Id: Idf96e1e6a381bf0fe0b1cb2d16e3dad39ce7a0dc
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/245500
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/futility/test_dump_fmap.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/futility/test_dump_fmap.sh b/tests/futility/test_dump_fmap.sh index 142a1540..bcdb27e6 100755 --- a/tests/futility/test_dump_fmap.sh +++ b/tests/futility/test_dump_fmap.sh @@ -24,6 +24,9 @@ cmp "${SCRIPTDIR}/data_fmap_expect_h.txt" "$TMP" # contain the stuff that the FMAP claims it does. if "$FUTILITY" dump_fmap -x "${SCRIPTDIR}/data_fmap.bin" FMAP; then false; fi +# This should fail too +if "$FUTILITY" show "${SCRIPTDIR}/data_fmap.bin"; then false; fi + # However, this should work. "$FUTILITY" dump_fmap -x "${SCRIPTDIR}/data_fmap.bin" SI_DESC > "$TMP" cmp "${SCRIPTDIR}/data_fmap_expect_x.txt" "$TMP" |