From 81069f0c65bafe094b0cd5b46acab608f86bcaae Mon Sep 17 00:00:00 2001 From: Evan Benn Date: Mon, 25 Jul 2022 13:55:15 +1000 Subject: flashrom_tester: Parse fmap header as little endian The fmap header was incorrectly parsed as big endian. BUG=b:240097529 BRANCH=None TEST=/usr/bin/flashrom_tester --debug :lib: host Coreboot_ELOG_sanity Change-Id: Ia683ce7a6ce3bc009218c300abb9c3a16ea06a6d Reviewed-on: https://review.coreboot.org/c/flashrom/+/66119 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- util/flashrom_tester/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/flashrom_tester/src/tests.rs b/util/flashrom_tester/src/tests.rs index 8d5f19e8..7c6b8e8c 100644 --- a/util/flashrom_tester/src/tests.rs +++ b/util/flashrom_tester/src/tests.rs @@ -253,7 +253,7 @@ fn elog_sanity_test(env: &mut TestEnv) -> TestResult { return Err("ELOG contained no data".into()); } let data = fs::read(ELOG_FILE)?; - if u32::from_be_bytes(data[0..4].try_into()?) != 0x474f4c45 { + if u32::from_le_bytes(data[0..4].try_into()?) != 0x474f4c45 { return Err("ELOG had bad magic number".into()); } Ok(()) -- cgit v1.2.3