[FFmpeg-cvslog] tests/checkasm/sw_rgb: increase plane array buffers
James Almer
git at videolan.org
Tue Jan 28 20:26:35 EET 2025
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jan 28 14:12:44 2025 -0300| [7a16bfa7c92c97dc0e830ba451e89e52d626b3b3] | committer: James Almer
tests/checkasm/sw_rgb: increase plane array buffers
Fixes stack-buffer-overflow errors running under asan.
Reviewed-by: Marvin Scholz <epirat07 at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a16bfa7c92c97dc0e830ba451e89e52d626b3b3
---
tests/checkasm/sw_rgb.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c
index 5714bfaa1e..5808cd79e4 100644
--- a/tests/checkasm/sw_rgb.c
+++ b/tests/checkasm/sw_rgb.c
@@ -549,21 +549,21 @@ static void check_yuv2packed1(void)
const int16_t *chrv[2];
const int16_t *alpha;
- LOCAL_ALIGNED_8(int32_t, src_y, [INPUT_SIZE]);
- LOCAL_ALIGNED_8(int32_t, src_u, [INPUT_SIZE]);
- LOCAL_ALIGNED_8(int32_t, src_v, [INPUT_SIZE]);
- LOCAL_ALIGNED_8(int32_t, src_a, [INPUT_SIZE]);
+ LOCAL_ALIGNED_8(int32_t, src_y, [2 * INPUT_SIZE]);
+ LOCAL_ALIGNED_8(int32_t, src_u, [2 * INPUT_SIZE]);
+ LOCAL_ALIGNED_8(int32_t, src_v, [2 * INPUT_SIZE]);
+ LOCAL_ALIGNED_8(int32_t, src_a, [2 * INPUT_SIZE]);
LOCAL_ALIGNED_8(uint8_t, dst0, [INPUT_SIZE * sizeof(int32_t[4])]);
LOCAL_ALIGNED_8(uint8_t, dst1, [INPUT_SIZE * sizeof(int32_t[4])]);
- randomize_buffers((uint8_t*)src_y, INPUT_SIZE * sizeof(int32_t));
- randomize_buffers((uint8_t*)src_u, INPUT_SIZE * sizeof(int32_t));
- randomize_buffers((uint8_t*)src_v, INPUT_SIZE * sizeof(int32_t));
- randomize_buffers((uint8_t*)src_a, INPUT_SIZE * sizeof(int32_t));
+ randomize_buffers((uint8_t*)src_y, 2 * INPUT_SIZE * sizeof(int32_t));
+ randomize_buffers((uint8_t*)src_u, 2 * INPUT_SIZE * sizeof(int32_t));
+ randomize_buffers((uint8_t*)src_v, 2 * INPUT_SIZE * sizeof(int32_t));
+ randomize_buffers((uint8_t*)src_a, 2 * INPUT_SIZE * sizeof(int32_t));
/* Limit to 14 bit input range */
- for (int i = 0; i < INPUT_SIZE; i++) {
+ for (int i = 0; i < 2 * INPUT_SIZE; i++) {
src_y[i] &= 0x3FFF3FFF;
src_a[i] &= 0x3FFF3FFF;
src_u[i] &= 0x3FFF3FFF;
More information about the ffmpeg-cvslog
mailing list