Commit bbc10a1a authored by Lazaros Koromilas's avatar Lazaros Koromilas Committed by Michael Niedermayer

libavformat/utils: Fix segfault on m4a cover artwork parsing

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 12875df3
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment