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>
release/6.1
Michael Niedermayer 11 months ago
parent 7dbea8ef0b
commit ce35590562
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libswscale/utils.c

@ -1891,7 +1891,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;

Loading…
Cancel
Save