]> git.sesse.net Git - ffmpeg/commit
avformat/webmdashenc: Check codec types
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 30 Mar 2020 00:50:02 +0000 (02:50 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 7 Apr 2020 13:01:10 +0000 (15:01 +0200)
commitcbea58b2b35c6409e062c929f0b2ab763b8661eb
treeeb4d67018c77efb0ae4356d494063a8f121efe88
parenta13841b79782eb09222d953e9c7d3cd00fefecf3
avformat/webmdashenc: Check codec types

The WebM DASH Manifest muxer only supports VP8, VP9, Vorbis and Opus,
but there was no check for this. The codec type is used to get a pointer
to a string containing the codec name or NULL if it is not one of those
four codecs. Said pointer has then been used without further checks as
string for the %s conversion specifier in an avio_printf()) call which
is undefined behaviour.

This commit adds a check for the supported codec types.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/webmdashenc.c