diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 74df0764b2..aaeff210df 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2053,6 +2053,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, offset = matroska_decode_buffer(&pkt_data,&pkt_size, track); if (offset < 0) continue; + av_assert0(offset + pkt_size >= pkt_size); } pkt = av_mallocz(sizeof(AVPacket));