mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-10 00:40:01 +01:00
avcodec/vble: Check av_image_get_buffer_size() for failure
Fixes: CID1461482 Improper use of negative value
Sponsored-by: Sovereign Tech Fund
Reviewed-.by: "Xiang, Haihao" <haihao.xiang@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dd5379db5d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -190,6 +190,9 @@ static av_cold int vble_decode_init(AVCodecContext *avctx)
|
||||
ctx->size = avpicture_get_size(avctx->pix_fmt,
|
||||
avctx->width, avctx->height);
|
||||
|
||||
if (ctx->size < 0)
|
||||
return ctx->size;
|
||||
|
||||
ctx->val = av_malloc_array(ctx->size, sizeof(*ctx->val));
|
||||
|
||||
if (!ctx->val) {
|
||||
|
||||
Reference in New Issue
Block a user