From 3da1ed181ec70f28b5e68b992d12e31520ccd2cf Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 8 Jan 2024 00:21:06 +0800 Subject: [PATCH] set hash default value to 0x30 ("0") this makes it much easier to detect if a loader failed to set a hash in other routines. --- loader/src/phase2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/src/phase2.rs b/loader/src/phase2.rs index 86ae48320..2855ca7e0 100644 --- a/loader/src/phase2.rs +++ b/loader/src/phase2.rs @@ -38,7 +38,7 @@ pub fn phase_2(cfg: &mut BootConfig, fs_prehash: &[u8; 64]) { 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x41, 0x42, 0x43, 0x44, 0x45, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, ]; // Convert the fs_prehash into a hex ascii string, suitable for environment variables // The initial loader environment is hard-coded, so we use a hard-coded offset for the string