From 3da107300d6249c1250725dbd6bcb043b0ce9fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20J=C3=BCrgens?= Date: Thu, 11 May 2023 23:10:38 +0200 Subject: [PATCH] add `rust-unaligned-access-backport.patch` --- assets/patches.txt | 1 + patches/rust-unaligned-access-backport.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 patches/rust-unaligned-access-backport.patch diff --git a/assets/patches.txt b/assets/patches.txt index c541e5e..472b673 100644 --- a/assets/patches.txt +++ b/assets/patches.txt @@ -13,6 +13,7 @@ patches/librewolf-prefs.patch patches/mozilla_dirs.patch patches/msix-fixed-113.patch patches/remove_addons.patch +patches/rust-unaligned-access-backport.patch patches/sed-patches/allow-searchengines-non-esr.patch patches/sed-patches/disable-pocket.patch patches/sed-patches/stop-undesired-requests.patch diff --git a/patches/rust-unaligned-access-backport.patch b/patches/rust-unaligned-access-backport.patch new file mode 100644 index 0000000..af9dedc --- /dev/null +++ b/patches/rust-unaligned-access-backport.patch @@ -0,0 +1,12 @@ +# Backport of https://github.com/mozilla/authenticator-rs/pull/246 +--- a/third_party/rust/authenticator/src/transport/windows/winapi.rs ++++ b/third_party/rust/authenticator/src/transport/windows/winapi.rs +@@ -221,7 +221,7 @@ impl DeviceInterfaceDetailData { + } + + fn path(&self) -> String { +- unsafe { from_wide_ptr((*self.data).DevicePath.as_ptr(), self.path_len - 2) } ++ unsafe { from_wide_ptr(ptr::addr_of!((*self.data).DevicePath[0]), self.path_len - 2) } + } + } +