diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 09b6a2f17d..e39338870f 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -962,6 +962,9 @@ intra: } end: + if (get_bits_left(&s->gb) < 0) + return AVERROR_INVALIDDATA; + /* per-MB end of slice check */ { int v= show_bits(&s->gb, 16);