You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/pngdec: check av_image_get_linesize return value
Fixes CID 1257012 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
dceb8b1252
commit
4fa2758c79
@@ -872,6 +872,9 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s,
|
|||||||
s->previous_picture.f->data[0] : s->last_picture.f->data[0];
|
s->previous_picture.f->data[0] : s->last_picture.f->data[0];
|
||||||
int ls = FFMIN(av_image_get_linesize(p->format, s->width, 0), s->width * s->bpp);
|
int ls = FFMIN(av_image_get_linesize(p->format, s->width, 0), s->width * s->bpp);
|
||||||
|
|
||||||
|
if (ls < 0)
|
||||||
|
return ls;
|
||||||
|
|
||||||
if (s->blend_op == APNG_BLEND_OP_OVER &&
|
if (s->blend_op == APNG_BLEND_OP_OVER &&
|
||||||
avctx->pix_fmt != AV_PIX_FMT_RGBA && avctx->pix_fmt != AV_PIX_FMT_ARGB) {
|
avctx->pix_fmt != AV_PIX_FMT_RGBA && avctx->pix_fmt != AV_PIX_FMT_ARGB) {
|
||||||
avpriv_request_sample(avctx, "Blending with pixel format %s",
|
avpriv_request_sample(avctx, "Blending with pixel format %s",
|
||||||
|
Reference in New Issue
Block a user