diff options
author | Lazaros Koromilas <lostd@2f30.org> | 2014-05-27 14:38:44 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-28 03:35:39 +0200 |
commit | bbc10a1aa537c75224b14252eb94c4c829c61a3b (patch) | |
tree | 298342f7b40d74085da31760187592a116510c1e | |
parent | 12875df324e5d3c563176cb108b1c09182fe1dfa (diff) | |
download | ffmpeg-bbc10a1aa537c75224b14252eb94c4c829c61a3b.tar.gz |
libavformat/utils: Fix segfault on m4a cover artwork parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index f35e956f74..357627924a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -517,6 +517,8 @@ int avformat_queue_attached_pictures(AVFormatContext *s) if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC && s->streams[i]->discard < AVDISCARD_ALL) { AVPacket copy = s->streams[i]->attached_pic; + if (copy.size <= 0) + return AVERROR(EINVAL); copy.buf = av_buffer_ref(copy.buf); if (!copy.buf) return AVERROR(ENOMEM); |