Skip to content

Commit 6f5b427

Browse files
nicholasbishopGabrielMajeri
authored andcommitted
Remove exts::allocate_buffer
This function could cause undefined behavior when called with a `Layout` with an alignment other than 1. Fixes #406
1 parent 57e61fb commit 6f5b427

File tree

3 files changed

+7
-31
lines changed

3 files changed

+7
-31
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
`RuntimeServices::query_variable_info` methods now check the table
1616
version to make sure it's 2.0 or higher before calling the associated
1717
function pointers. This prevents potential invalid pointer access.
18+
19+
### Removed
20+
21+
- Removed the `exts::allocate_buffer` function. This function could
22+
cause undefined behavior when called with a `Layout` with an alignment
23+
other than 1. A safe alternative is to use
24+
[`Vec::into_boxed_slice`](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.into_boxed_slice).
1825

1926
## uefi-macros - [Unreleased]
2027

src/exts.rs

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,5 @@ pub mod prelude;
6161
#[cfg(feature = "alloc")]
6262
pub mod alloc;
6363

64-
#[cfg(feature = "exts")]
65-
pub mod exts;
66-
6764
#[cfg(feature = "logger")]
6865
pub mod logger;

0 commit comments

Comments
 (0)