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> (cherry picked from commit a5d849b149ca67ced2d271dc84db0bc95a548abb) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
625fb08959
commit
5415c88e37
@ -1098,6 +1098,9 @@ static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt)
|
|||||||
if (!sub_demuxer)
|
if (!sub_demuxer)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
if (strcmp(sub_demuxer->name, "srt") && strcmp(sub_demuxer->name, "ass"))
|
||||||
|
goto error;
|
||||||
|
|
||||||
if (!(ast->sub_ctx = avformat_alloc_context()))
|
if (!(ast->sub_ctx = avformat_alloc_context()))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user