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:
+1
-1
@@ -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
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user