Browse Source

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>
tags/n3.4
Michael Niedermayer 8 years ago
parent
commit
a5d849b149
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/avidec.c

+ 3
- 0
libavformat/avidec.c View File

@@ -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;



Loading…
Cancel
Save