[FFmpeg-cvslog] id3v2: reject APICs with size of 0
Piotr Bandurski
git at videolan.org
Sun May 20 16:40:05 CEST 2012
ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Sat May 19 20:58:17 2012 +0200| [4d18f4c15be1b338d30c236d8065d4cac75ceed1] | committer: Michael Niedermayer
id3v2: reject APICs with size of 0
fixes ticket #1324
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d18f4c15be1b338d30c236d8065d4cac75ceed1
---
libavformat/id3v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 3b02d2b..216d4a2 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -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";
More information about the ffmpeg-cvslog
mailing list