diff options
author | Anton Khirnov <wyskas@gmail.com> | 2010-11-03 06:29:04 +0000 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2010-11-03 06:29:04 +0000 |
commit | bf800c7db8aae141ed79adf6e97398190521944c (patch) | |
tree | 40f6c66f8c2c89b5b8913830caef15306125d08e /libavformat/matroskadec.c | |
parent | 61b1f0f909f6adb5e1e32c8b45a692f67a5a40fb (diff) | |
download | ffmpeg-bf800c7db8aae141ed79adf6e97398190521944c.tar.gz |
matroskadec: skip invalid tags with no TagName
fixes segfault in issue 2328
Originally committed as revision 25659 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 136839ad89..820140fb9e 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -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) { |