Fix rc5 audit findings: exact libfreemkv pin, cdb test coverage

- ld/Cargo.toml: pin libfreemkv = "=1.0.0-rc.4.3" (exact, fail-closed)
  instead of the bare caret that accepted later 1.0.0 prereleases.
- ld/src/cdb.rs: replace the duplicate (2,0x44) assertion with a real
  wrong-mode/right-buffer case (0,0x77) so the 'Wrong mode, right buffer
  id' comment is actually exercised.
This commit is contained in:
Matthew Jackson
2026-06-23 19:11:25 -07:00
parent ef3a6fe42d
commit 8a5ab9f27d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ description = "LibreDrive unlocker plugin for libfreemkv (firmware unlock for Me
repository = "https://github.com/freemkv/freemkv-unlock"
[dependencies]
libfreemkv = "1.0.0-rc.4.3"
libfreemkv = "=1.0.0-rc.4.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
base64 = "0.22.1"
+1 -1
View File
@@ -47,7 +47,7 @@ mod tests {
assert!(!is_unlock_read_buffer(1, 0x77));
assert!(!is_unlock_read_buffer(2, 0x44));
// Wrong mode, right buffer id.
assert!(!is_unlock_read_buffer(2, 0x44));
assert!(!is_unlock_read_buffer(0, 0x77));
assert!(!is_unlock_read_buffer(0, 0x44));
assert!(!is_unlock_read_buffer(3, 0x77));
// Ordinary data reads.