mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-28 05:30:34 +00:00
id3v2: Fix null ptr crash in get_extra_meta_func()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8bd2b27f6b
commit
aedd30b63a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user