diff mbox series

[FFmpeg-devel,2/4] avformat/matroskadec: Add assert to silence Coverity false positive

Message ID GV1P250MB0737F89F38B2640CB6AF46D58FF52@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 996e0a57cad35d6ec5c6eef845628e7c8be240e0
Headers show
Series [FFmpeg-devel,1/4] avfilter/vf_signalstats: Use 64bit for processing histogram | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt May 24, 2024, 8:05 a.m. UTC
Helps with Coverity issue #1452453.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/matroskadec.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 2f07e11d87..13959f8b3d 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1315,6 +1315,8 @@  static int ebml_parse(MatroskaDemuxContext *matroska,
                     matroska->num_levels--;
                     return LEVEL_ENDED;
                 }
+                // We have not encountered a known element; syntax is a sentinel.
+                av_assert1(syntax->type == EBML_NONE);
             };
         }