[FFmpeg-cvslog] matroskadec: Check that .lang was allocated and set before reading it
Martin Storsjö
git at videolan.org
Sat Sep 7 14:25:48 CEST 2013
ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Tue Sep 3 12:10:50 2013 +0300| [aade60ab165716523788cd11caf03ae61b40144a] | committer: Luca Barbato
matroskadec: Check that .lang was allocated and set before reading it
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 5bcd3ae5b167fb74215520b01d5d810e0c8986ab)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aade60ab165716523788cd11caf03ae61b40144a
---
libavformat/matroskadec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 147c24c..fe4d932 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1157,7 +1157,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");
More information about the ffmpeg-cvslog
mailing list