mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-12-18 08:58:37 +00:00
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>
This commit is contained in:
parent
f7c5883126
commit
5bcd3ae5b1
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user