File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ details of the deprecated items that were removed in this release.
10
10
- ** Breaking:** ` FileSystem ` no longer has a lifetime parameter, and the
11
11
deprecated conversion from ` uefi::table::boot::ScopedProtocol ` has been
12
12
removed.
13
+ - Fixed ` boot::open_protocol ` to properly handle a null interface pointer.
13
14
14
15
15
16
# uefi - 0.32.0 (2024-09-09)
Original file line number Diff line number Diff line change @@ -969,9 +969,16 @@ pub unsafe fn open_protocol<P: ProtocolPointer + ?Sized>(
969
969
Handle :: opt_to_ptr ( params. controller ) ,
970
970
attributes as u32 ,
971
971
)
972
- . to_result_with_val ( || ScopedProtocol {
973
- interface : NonNull :: new ( P :: mut_ptr_from_ffi ( interface) ) ,
974
- open_params : params,
972
+ . to_result_with_val ( || {
973
+ let interface = if interface. is_null ( ) {
974
+ None
975
+ } else {
976
+ NonNull :: new ( P :: mut_ptr_from_ffi ( interface) )
977
+ } ;
978
+ ScopedProtocol {
979
+ interface,
980
+ open_params : params,
981
+ }
975
982
} )
976
983
}
977
984
You can’t perform that action at this time.
0 commit comments