1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

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 019fce18bb0628ac8bc47a81d647a23d604b6123)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-06-03 01:25:59 +02:00
parent 871c89e0ba
commit 9e6950dcb4
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -4207,7 +4207,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);