Commit 3934aa49 authored by Michael Niedermayer's avatar Michael Niedermayer

libavformat/oggparsevorbis: Fix memleak on multiple headers

Fixes: Chromium bug 800123
Reported-by: 's avatarMatt Wolenetz <wolenetz@google.com>
Reviewed-by: 's avatarMatt Wolenetz <wolenetz@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 367929be
......@@ -230,6 +230,10 @@ static int fixup_vorbis_headers(AVFormatContext *as,
len = priv->len[0] + priv->len[1] + priv->len[2];
buf_len = len + len / 255 + 64;
if (*buf)
return AVERROR_INVALIDDATA;
ptr = *buf = av_realloc(NULL, buf_len);
if (!ptr)
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