Commit aedd30b6 authored by Michael Niedermayer's avatar Michael Niedermayer

id3v2: Fix null ptr crash in get_extra_meta_func()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8bd2b27f
...@@ -409,14 +409,14 @@ static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34) ...@@ -409,14 +409,14 @@ static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34)
{ {
int i = 0; int i = 0;
while (id3v2_extra_meta_funcs[i].tag3) { while (id3v2_extra_meta_funcs[i].tag3) {
if (!memcmp(tag, if (tag && !memcmp(tag,
(isv34 ? id3v2_extra_meta_funcs[i].tag4 : (isv34 ? id3v2_extra_meta_funcs[i].tag4 :
id3v2_extra_meta_funcs[i].tag3), id3v2_extra_meta_funcs[i].tag3),
(isv34 ? 4 : 3))) (isv34 ? 4 : 3)))
return &id3v2_extra_meta_funcs[i]; return &id3v2_extra_meta_funcs[i];
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) static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags, ID3v2ExtraMeta **extra_meta)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment