Skip to content

Commit a5d849b

Browse files
committed
avformat/avidec: Limit formats in gab2 to srt and ass/ssa
This prevents part of one exploit leading to an information leak Found-by: Emil Lerner and Pavel Cheremushkin Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 parent 78f6ec3 commit a5d849b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: libavformat/avidec.c

+3
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,9 @@ static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt)
10991099
if (!sub_demuxer)
11001100
goto error;
11011101

1102+
if (strcmp(sub_demuxer->name, "srt") && strcmp(sub_demuxer->name, "ass"))
1103+
goto error;
1104+
11021105
if (!(ast->sub_ctx = avformat_alloc_context()))
11031106
goto error;
11041107

0 commit comments

Comments
 (0)