id3v2: reject APICs with size of 0

fixes ticket #1324

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Piotr Bandurski 2012-05-19 20:58:17 +02:00 committed by Michael Niedermayer
parent cb7b0f3573
commit 4d18f4c15b
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag
apic->len = taglen;
apic->data = av_malloc(taglen);
if (!apic->data || avio_read(pb, apic->data, taglen) != taglen)
if (!apic->data || !apic->len || avio_read(pb, apic->data, taglen) != taglen)
goto fail;
new_extra->tag = "APIC";