avformat/matroskadec: Assert that num_levels is non negative

Maybe Closes: CID1452496 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 019fce18bb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/6.1
Michael Niedermayer 7 months ago
parent bde8a67e92
commit d081214a70
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libavformat/matroskadec.c

@ -4197,7 +4197,7 @@ static int matroska_parse_cluster(MatroskaDemuxContext *matroska)
MatroskaBlock *block = &cluster->block;
int res;
av_assert0(matroska->num_levels <= 2);
av_assert0(matroska->num_levels <= 2U);
if (matroska->num_levels == 1) {
res = ebml_parse(matroska, matroska_segment, NULL);

Loading…
Cancel
Save