diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-08 21:50:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-21 15:57:43 +0200 |
commit | 05e21b89024301f3fcf97b349ffe2ae4a80c83b6 (patch) | |
tree | 8f28b7bba4cedb5f4d95f1a3eacad8bc0a0491c9 | |
parent | 9385847af47211e8c618198499ffea99614bb55d (diff) | |
download | ffmpeg-05e21b89024301f3fcf97b349ffe2ae4a80c83b6.tar.gz |
avfilter/vf_premultiply: Use AV_PIX_MAX_PLANES
Helps: CID1435164 Out-of-bounds read
Helps: CID1435165 Out-of-bounds read
Helps: CID1435167 Out-of-bounds read
Helps: CID1435169 Out-of-bounds read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavfilter/vf_premultiply.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c index e077d46a9a..5e97c2000f 100644 --- a/libavfilter/vf_premultiply.c +++ b/libavfilter/vf_premultiply.c @@ -36,8 +36,8 @@ typedef struct ThreadData { typedef struct PreMultiplyContext { const AVClass *class; - int width[4], height[4]; - int linesize[4]; + int width[AV_VIDEO_MAX_PLANES], height[AV_VIDEO_MAX_PLANES]; + int linesize[AV_VIDEO_MAX_PLANES]; int nb_planes; int planes; int inverse; @@ -45,7 +45,7 @@ typedef struct PreMultiplyContext { int half, depth, offset, max; FFFrameSync fs; - void (*premultiply[4])(const uint8_t *msrc, const uint8_t *asrc, + void (*premultiply[AV_VIDEO_MAX_PLANES])(const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, |