Skip to content
Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
michaelni committed May 31, 2017
1 parent 78f6ec3 commit a5d849b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libavformat/avidec.c
Expand Up @@ -1099,6 +1099,9 @@ static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt)
if (!sub_demuxer)
goto error;

if (strcmp(sub_demuxer->name, "srt") && strcmp(sub_demuxer->name, "ass"))
goto error;

if (!(ast->sub_ctx = avformat_alloc_context()))
goto error;

Expand Down

0 comments on commit a5d849b

Please sign in to comment.