parent
72cd36f806
commit
11ba126d6a
@ -0,0 +1,27 @@
|
|||||||
|
From 1596b669d73579c22c8fbd1cd2ef0743bb50fdce Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabio Valentini <decathorpe@gmail.com>
|
||||||
|
Date: Fri, 13 Jan 2023 17:35:44 +0100
|
||||||
|
Subject: [PATCH] Fix UB in pred_max test
|
||||||
|
|
||||||
|
Backport of upstream commit:
|
||||||
|
https://github.com/xiph/rav1e/commit/d56fe642bbbd8fe3d20c851b950db3fcaea53c7a
|
||||||
|
---
|
||||||
|
src/predict.rs | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/predict.rs b/src/predict.rs
|
||||||
|
index 8e0108a..6058ccb 100644
|
||||||
|
--- a/src/predict.rs
|
||||||
|
+++ b/src/predict.rs
|
||||||
|
@@ -1542,7 +1542,7 @@ mod test {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- let above_left = unsafe { *above.as_ptr().offset(-1) };
|
||||||
|
+ let above_left = max12bit;
|
||||||
|
|
||||||
|
pred_paeth(
|
||||||
|
&mut o.as_region_mut(),
|
||||||
|
--
|
||||||
|
2.39.0
|
||||||
|
|
@ -0,0 +1,23 @@
|
|||||||
|
From d56fe642bbbd8fe3d20c851b950db3fcaea53c7a Mon Sep 17 00:00:00 2001
|
||||||
|
From: redzic <48274562+redzic@users.noreply.github.com>
|
||||||
|
Date: Thu, 29 Sep 2022 15:17:00 -0500
|
||||||
|
Subject: [PATCH] Fix UB in pred_max test
|
||||||
|
|
||||||
|
---
|
||||||
|
src/predict.rs | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/predict.rs b/src/predict.rs
|
||||||
|
index 85cdd69abb..75140830db 100644
|
||||||
|
--- a/src/predict.rs
|
||||||
|
+++ b/src/predict.rs
|
||||||
|
@@ -1558,8 +1558,7 @@ mod test {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- // SAFETY: ???
|
||||||
|
- let above_left = unsafe { *above.as_ptr().offset(-1) };
|
||||||
|
+ let above_left = max12bit;
|
||||||
|
|
||||||
|
pred_paeth(
|
||||||
|
&mut o.as_region_mut(),
|
Loading…
Reference in new issue