Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita457110

Browse files
authored
Merge pull request#1282 from nicholasbishop/bishop-fix-dp-lifetimes
uefi: Fix lifetimes in device_path TryFrom<&[u8]> impls
2 parentsc3ed645 +a9e48c2 commita457110

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

‎uefi/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
> use uefi::table::boot::BootServices;
4040
```
4141

42+
43+
#uefi - 0.30.0 (unreleased)
44+
##Changed
45+
-**Breaking:**: Fixed a bug in the impls of`TryFrom<&[u8]>` for
46+
`&DevicePathHeader`,`&DevicePathNode` and`&DevicePath` that could lead to
47+
memory unsafety. See<https://github.com/rust-osdev/uefi-rs/issues/1281>.
48+
49+
4250
#uefi - 0.29.0 (2024-07-02)
4351

4452
##Added

‎uefi/src/proto/device_path/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub struct DevicePathHeader {
119119
publength:u16,
120120
}
121121

122-
impl<'a>TryFrom<&[u8]>for&'aDevicePathHeader{
122+
impl<'a>TryFrom<&'a[u8]>for&'aDevicePathHeader{
123123
typeError =ByteConversionError;
124124

125125
fntry_from(bytes:&[u8]) ->Result<Self,Self::Error>{
@@ -265,7 +265,7 @@ impl PartialEq for DevicePathNode {
265265
}
266266
}
267267

268-
impl<'a>TryFrom<&[u8]>for&'aDevicePathNode{
268+
impl<'a>TryFrom<&'a[u8]>for&'aDevicePathNode{
269269
typeError =ByteConversionError;
270270

271271
fntry_from(bytes:&[u8]) ->Result<Self,Self::Error>{
@@ -516,7 +516,7 @@ impl PartialEq for DevicePath {
516516
}
517517
}
518518

519-
impl<'a>TryFrom<&[u8]>for&'aDevicePath{
519+
impl<'a>TryFrom<&'a[u8]>for&'aDevicePath{
520520
typeError =ByteConversionError;
521521

522522
fntry_from(bytes:&[u8]) ->Result<Self,Self::Error>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp