diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-03 05:04:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-03 05:12:56 +0100 |
commit | aedd30b63af8efd5ee6237a6c24dd8cca8851b3c (patch) | |
tree | 1fa725060723217b5cf372051a83460878fce85e | |
parent | 8bd2b27f6b90c8c8cbde9f8d72245dd768b66f41 (diff) | |
download | ffmpeg-aedd30b63af8efd5ee6237a6c24dd8cca8851b3c.tar.gz |
id3v2: Fix null ptr crash in get_extra_meta_func()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/id3v2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 7797cca091..f0a21977ef 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -409,14 +409,14 @@ static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34) { int i = 0; while (id3v2_extra_meta_funcs[i].tag3) { - if (!memcmp(tag, + if (tag && !memcmp(tag, (isv34 ? id3v2_extra_meta_funcs[i].tag4 : id3v2_extra_meta_funcs[i].tag3), (isv34 ? 4 : 3))) return &id3v2_extra_meta_funcs[i]; i++; } - return &id3v2_extra_meta_funcs[i]; + return NULL; } static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags, ID3v2ExtraMeta **extra_meta) |