Skip to content

Commit 8ae3311

Browse files
Add missing type/subtype checks to TryFrom<&DevicePathNode>
This fixes a bug where `&DevicePathNode` could be converted to any specific node type as long as the node length matches. The node type and subtype needs to be checked first. Also added a test for this.
1 parent 3f819f4 commit 8ae3311

File tree

4 files changed

+353
-0
lines changed

4 files changed

+353
-0
lines changed

uefi/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
## Changed
44
- MSRV increased to 1.81.
55
- `core::error::Error` impls are no longer gated by the `unstable` feature.
6+
- Fixed missing checks in the `TryFrom` conversion from `&DevicePathNode` to
7+
specific node types. The node type and subtype are now checked, and
8+
`NodeConversionError::DifferentType` is returned if they do not match.
69

710

811
# uefi - 0.33.0 (2024-10-23)

0 commit comments

Comments
 (0)