[FFmpeg-devel] [PATCH] lavc/midivid: FIX CID 1456088

Paul B Mahol onemda at gmail.com
Sun Dec 22 16:44:22 EET 2019


Not ok, please use ret variable.

On 12/22/19, Zhong Li <zhongli_dev at 126.com> wrote:
> Signed-off-by: Zhong Li <zhongli_dev at 126.com>
> ---
>  libavcodec/midivid.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/midivid.c b/libavcodec/midivid.c
> index 38465c5..6877c60 100644
> --- a/libavcodec/midivid.c
> +++ b/libavcodec/midivid.c
> @@ -73,7 +73,8 @@ static int decode_mvdv(MidiVidContext *s, AVCodecContext
> *avctx, AVFrame *frame)
>          if (bytestream2_get_bytes_left(gb) < mask_size)
>              return AVERROR_INVALIDDATA;
>
> -        init_get_bits8(&mask, mask_start, mask_size);
> +        if (init_get_bits8(&mask, mask_start, mask_size) < 0)
> +            return AVERROR_INVALIDDATA;
>          bytestream2_skip(gb, mask_size);
>          skip = s->skip;
>
> --
> 1.8.3.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list