aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-28 09:49:38 +0100
committerAnton Khirnov <anton@khirnov.net>2013-04-08 22:25:27 +0200
commit5ebdfbe893c4509f5be6d950fe5f5f25bf52c397 (patch)
tree807c5e6ca9749a6c459ba56fd9de737c46b1b707
parent094a35aeefea6c0309e623811255e76bdda592ee (diff)
downloadffmpeg-5ebdfbe893c4509f5be6d950fe5f5f25bf52c397.tar.gz
id3v2: pad the APIC packets as required by lavc.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
-rw-r--r--libavformat/id3v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 4516ac74ef..7f39a47428 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -477,9 +477,10 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag
}
apic->len = taglen;
- apic->data = av_malloc(taglen);
+ apic->data = av_malloc(taglen + FF_INPUT_BUFFER_PADDING_SIZE);
if (!apic->data || avio_read(pb, apic->data, taglen) != taglen)
goto fail;
+ memset(apic->data + taglen, 0, FF_INPUT_BUFFER_PADDING_SIZE);
new_extra->tag = "APIC";
new_extra->data = apic;