From c867cd96956a2c5034496362c4a530b97fefe4b8 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 13 Jan 2023 17:35:44 +0100 Subject: [PATCH 2/3] 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.2