mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
swscale/utils: Allocate more dithererror
Fixes: out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 18f26f8a2f8dc3b9ec3ac3ab8e03fce15cc8c88d) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1ed96bc406
commit
c71a9c51e7
@ -1895,7 +1895,7 @@ av_cold int sws_init_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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user