mirror of https://git.ffmpeg.org/ffmpeg.git
swscale/utils: Allocate more dithererror
Fixes: out of array read
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 18f26f8a2f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4f8ef0c274
commit
facfb2d25d
|
@ -1748,7 +1748,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
|
|||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
FF_ALLOCZ_OR_GOTO(c, c->dither_error[i], (c->dstW+2) * sizeof(int), fail);
|
||||
FF_ALLOCZ_OR_GOTO(c, c->dither_error[i], (c->dstW+3) * sizeof(int), fail);
|
||||
|
||||
c->needAlpha = (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat) && isALPHA(c->dstFormat)) ? 1 : 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue