mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
9385847af4
commit
05e21b8902
|
@ -36,8 +36,8 @@ typedef struct ThreadData {
|
||||||
|
|
||||||
typedef struct PreMultiplyContext {
|
typedef struct PreMultiplyContext {
|
||||||
const AVClass *class;
|
const AVClass *class;
|
||||||
int width[4], height[4];
|
int width[AV_VIDEO_MAX_PLANES], height[AV_VIDEO_MAX_PLANES];
|
||||||
int linesize[4];
|
int linesize[AV_VIDEO_MAX_PLANES];
|
||||||
int nb_planes;
|
int nb_planes;
|
||||||
int planes;
|
int planes;
|
||||||
int inverse;
|
int inverse;
|
||||||
|
@ -45,7 +45,7 @@ typedef struct PreMultiplyContext {
|
||||||
int half, depth, offset, max;
|
int half, depth, offset, max;
|
||||||
FFFrameSync fs;
|
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,
|
uint8_t *dst,
|
||||||
ptrdiff_t mlinesize, ptrdiff_t alinesize,
|
ptrdiff_t mlinesize, ptrdiff_t alinesize,
|
||||||
ptrdiff_t dlinesize,
|
ptrdiff_t dlinesize,
|
||||||
|
|
Loading…
Reference in New Issue