diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-03 12:10:50 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-09-03 22:57:15 +0300 |
commit | 5bcd3ae5b167fb74215520b01d5d810e0c8986ab (patch) | |
tree | 1d7426119b3c8830a867e8abc953fdf62b373e82 | |
parent | f7c5883126f9440547933eefcf000aa78af4821c (diff) | |
download | ffmpeg-5bcd3ae5b167fb74215520b01d5d810e0c8986ab.tar.gz |
matroskadec: Check that .lang was allocated and set before reading it
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/matroskadec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 9b116b0100..d5b60714ac 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1189,7 +1189,8 @@ static void matroska_convert_tag(AVFormatContext *s, EbmlList *list, int i; for (i=0; i < list->nb_elem; i++) { - const char *lang = strcmp(tags[i].lang, "und") ? tags[i].lang : NULL; + const char *lang = tags[i].lang && strcmp(tags[i].lang, "und") ? + tags[i].lang : NULL; if (!tags[i].name) { av_log(s, AV_LOG_WARNING, "Skipping invalid tag with no TagName.\n"); |