--- a/libavcodec/utvideodec.c 2017-12-11 05:35:09.000000000 +0800 +++ b/libavcodec/utvideodec.c 2018-02-06 15:54:54.872000000 +0800 @@ -561,7 +561,7 @@ static int decode_frame(AVCodecContext * for (j = 0; j < c->slices; j++) { slice_end = bytestream2_get_le32u(&gb); if (slice_end < 0 || slice_end < slice_start || - bytestream2_get_bytes_left(&gb) < slice_end) { + bytestream2_get_bytes_left(&gb) < slice_end + 1024LL) { av_log(avctx, AV_LOG_ERROR, "Incorrect slice size\n"); return AVERROR_INVALIDDATA; }