mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
matroskadec: skip invalid tags with no TagName
fixes segfault in issue 2328 Originally committed as revision 25659 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
61b1f0f909
commit
bf800c7db8
@ -1033,6 +1033,11 @@ static void matroska_convert_tag(AVFormatContext *s, EbmlList *list,
|
||||
|
||||
for (i=0; i < list->nb_elem; i++) {
|
||||
const char *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");
|
||||
continue;
|
||||
}
|
||||
if (prefix) snprintf(key, sizeof(key), "%s/%s", prefix, tags[i].name);
|
||||
else av_strlcpy(key, tags[i].name, sizeof(key));
|
||||
if (tags[i].def || !lang) {
|
||||
|
Loading…
Reference in New Issue
Block a user