Message ID | 20240217170947.25351-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 18f26f8a2f8dc3b9ec3ac3ab8e03fce15cc8c88d |
Headers | show |
Series | [FFmpeg-devel,1/2] swscale/utils: Allocate more dithererror | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Sat, Feb 17, 2024 at 06:09:46PM +0100, Michael Niedermayer wrote: > Fixes: out of array read > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libswscale/utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply patchset [...]
diff --git a/libswscale/utils.c b/libswscale/utils.c index ec822ff5d92..4dc0fbfefbf 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1885,7 +1885,7 @@ static av_cold int sws_init_single_context(SwsContext *c, SwsFilter *srcFilter, } for (i = 0; i < 4; i++) - if (!FF_ALLOCZ_TYPED_ARRAY(c->dither_error[i], c->dstW + 2)) + if (!FF_ALLOCZ_TYPED_ARRAY(c->dither_error[i], c->dstW + 3)) goto nomem; c->needAlpha = (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat) && isALPHA(c->dstFormat)) ? 1 : 0;
Fixes: out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libswscale/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)