aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-02-17 01:04:13 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2024-02-21 18:24:16 +0100
commit18f26f8a2f8dc3b9ec3ac3ab8e03fce15cc8c88d (patch)
tree0a9ac135b43378bc4f321011500738873d2156c0
parent6ef32ea5748e9dcc2c8d1c076607b8d15650a5fe (diff)
downloadffmpeg-18f26f8a2f8dc3b9ec3ac3ab8e03fce15cc8c88d.tar.gz
swscale/utils: Allocate more dithererror
Fixes: out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index ec822ff5d9..4dc0fbfefb 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;