summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch')
-rw-r--r--www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch b/www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch
new file mode 100644
index 0000000..164e31f
--- /dev/null
+++ b/www-client/chromium/files/chromium-142-crabbyavif-rust18x.patch
@@ -0,0 +1,48 @@
+diff --git a/third_party/crabbyavif/src/src/capi/io.rs b/third_party/crabbyavif/src/src/capi/io.rs
+index e7994ce312..cb2f3cb578 100644
+--- a/third_party/crabbyavif/src/src/capi/io.rs
++++ b/third_party/crabbyavif/src/src/capi/io.rs
+@@ -207,7 +207,7 @@ impl Drop for avifIOWrapper {
+ }
+
+ impl crate::decoder::IO for avifIOWrapper {
+- #[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))]
++ #[cfg_attr(feature = "disable_cfi")]
+ fn read(&mut self, offset: u64, size: usize) -> AvifResult<&[u8]> {
+ // SAFETY: Calling into a C function.
+ let res = unsafe {
+diff --git a/third_party/crabbyavif/src/src/lib.rs b/third_party/crabbyavif/src/src/lib.rs
+index 90fa411889..8dc9bf2066 100644
+--- a/third_party/crabbyavif/src/src/lib.rs
++++ b/third_party/crabbyavif/src/src/lib.rs
+@@ -13,7 +13,7 @@
+ // limitations under the License.
+
+ #![deny(unsafe_op_in_unsafe_fn)]
+-#![cfg_attr(feature = "disable_cfi", feature(sanitize))]
++#![cfg_attr(feature = "disable_cfi")]
+
+ #[macro_use]
+ mod internal_utils;
+diff --git a/third_party/crabbyavif/src/src/reformat/libyuv.rs b/third_party/crabbyavif/src/src/reformat/libyuv.rs
+index 9df874ccf7..cb25214914 100644
+--- a/third_party/crabbyavif/src/src/reformat/libyuv.rs
++++ b/third_party/crabbyavif/src/src/reformat/libyuv.rs
+@@ -372,7 +372,7 @@ fn find_conversion_function(
+ // Returns Ok(Some(false)) if only YUV was converted and alpha
+ // needs to be imported separately.
+ // Returns Ok(None) if the conversion is not implemented.
+-#[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))]
++#[cfg_attr(feature = "disable_cfi")]
+ pub(crate) fn yuv_to_rgb(image: &image::Image, rgb: &mut rgb::Image) -> AvifResult<Option<bool>> {
+ if (rgb.depth != 8 && rgb.depth != 10) || !image.depth_valid() {
+ return Ok(None); // Not implemented.
+@@ -833,7 +833,7 @@ fn rgb_to_yuv_conversion_function(
+ }
+ }
+
+-#[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))]
++#[cfg_attr(feature = "disable_cfi")]
+ pub(crate) fn rgb_to_yuv(rgb: &rgb::Image, image: &mut image::Image) -> AvifResult<Option<()>> {
+ let conversion_function = match rgb_to_yuv_conversion_function(rgb, image) {
+ Some(conversion_function) => conversion_function,