Skip to content
Snippets Groups Projects
Commit 5bcd3ae5 authored by Martin Storsjö's avatar Martin Storsjö
Browse files

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: default avatarMartin Storsjö <martin@martin.st>
parent f7c58831
No related branches found
No related tags found
No related merge requests found
...@@ -1189,7 +1189,8 @@ static void matroska_convert_tag(AVFormatContext *s, EbmlList *list, ...@@ -1189,7 +1189,8 @@ static void matroska_convert_tag(AVFormatContext *s, EbmlList *list,
int i; int i;
for (i=0; i < list->nb_elem; 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) { if (!tags[i].name) {
av_log(s, AV_LOG_WARNING, "Skipping invalid tag with no TagName.\n"); av_log(s, AV_LOG_WARNING, "Skipping invalid tag with no TagName.\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment