Skip to content

Add missing type/subtype checks to TryFrom<&DevicePathNode> #1516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

nicholasbishop
Copy link
Member

@nicholasbishop nicholasbishop commented Jan 11, 2025

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.

Fixes #1489

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

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.
@phip1611 phip1611 added this pull request to the merge queue Jan 12, 2025
Merged via the queue into main with commit a2b78a7 Jan 12, 2025
18 checks passed
@phip1611 phip1611 deleted the bishop-fix-conv-check branch January 12, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TryFrom conversion from DevicePathNode to specific node types is wrong; not checking the device type/subtype
2 participants