Commit b294a4be authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/oggparsecelt/celt_header: fix memleak

Fixes: CID1108605
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent baab248c
......@@ -46,7 +46,9 @@ static int celt_header(AVFormatContext *s, int idx)
uint32_t overlap, extra_headers;
priv = av_malloc(sizeof(struct oggcelt_private));
if (!priv || ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)))
if (!priv)
return AVERROR(ENOMEM);
if (ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)) < 0)
return AVERROR(ENOMEM);
version = AV_RL32(p + 28);
/* unused header size field skipped */
......
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