diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-23 01:27:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-23 01:27:49 +0100 |
commit | 01fd1aa0ad2b95045df35f94ee9de073d24609c8 (patch) | |
tree | 02d3667b460d027f96c989855b96a24d060e1b9f /libavformat/matroskadec.c | |
parent | 437f5daf0bf727a53ea4b485a30f1289f44bf252 (diff) | |
download | ffmpeg-01fd1aa0ad2b95045df35f94ee9de073d24609c8.tar.gz |
matroskadec: fix strcmp(NULL)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index dbe2815a9c..6d7401bfdd 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1145,7 +1145,7 @@ 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"); |