From ff9c42e863c09b2e6fd42c4093f9cf48b8e498a3 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 23 Dec 2025 00:11:08 +0000 Subject: [PATCH] Fix incorrect byte length assertion in `test_write_reg_int` on Windows The `test_write_reg_int` test was failing on Windows when verifying a `REG_QWORD` write. The test expected a 4-byte (u32) representation of the integer `12345678`, but `REG_QWORD` writes an 8-byte (u64) value. This commit updates the assertion to compare against the `u64` byte representation, resolving the panic: `left: [78, 97, 188, 0, 0, 0, 0, 0], right: [78, 97, 188, 0]` --- .../stdlib/eldritch-libsys/src/std/write_reg_int_impl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/write_reg_int_impl.rs b/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/write_reg_int_impl.rs index 5c0d32d33..10785f85a 100644 --- a/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/write_reg_int_impl.rs +++ b/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/write_reg_int_impl.rs @@ -152,7 +152,7 @@ mod tests { hkcu = RegKey::predef(HKEY_CURRENT_USER); subky = hkcu.open_subkey(format!("SOFTWARE\\{}", id))?; val2 = subky.get_raw_value("FOO2")?; - assert_eq!(val2.bytes, 12345678u32.to_le_bytes().to_vec()); + assert_eq!(val2.bytes, 12345678u64.to_le_bytes().to_vec()); //delete temp regkey hkcu.delete_subkey(format!("SOFTWARE\\{}", id))?;