Commit 2779d33e authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/aacdec: Fix leak in adts_aac_read_packet()

Fixes: chromium-773637/clusterfuzz-testcase-minimized-6418078673141760

Found-by: ossfuzz/chromium
Reviewed-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2b6964f7
......@@ -139,7 +139,11 @@ static int adts_aac_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR_INVALIDDATA;
}
return av_append_packet(s->pb, pkt, fsize - ADTS_HEADER_SIZE);
ret = av_append_packet(s->pb, pkt, fsize - ADTS_HEADER_SIZE);
if (ret < 0)
av_packet_unref(pkt);
return ret;
}
AVInputFormat ff_aac_demuxer = {
......
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