diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-11 17:08:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-11 17:16:18 +0100 |
commit | c71999ef97b7cc8b1cb6eaf39e72e9ecbf825d9e (patch) | |
tree | 316aca1b4d1c6fe325103801eb5a468433133a1b | |
parent | 71f73ee3250a46c2f97625f6b1fc263ed88c1008 (diff) | |
download | ffmpeg-c71999ef97b7cc8b1cb6eaf39e72e9ecbf825d9e.tar.gz |
avformat/dfa: Fix packet leak on error
Fixes: 07fa81f300736485e585b63e7b1cd155/signal_sigabrt_7ffff6ae7cb7_16_94ee815791a1357826524072db5bc2dc.dfa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/dfa.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/dfa.c b/libavformat/dfa.c index 40e3fad068..b16672ccde 100644 --- a/libavformat/dfa.c +++ b/libavformat/dfa.c @@ -101,6 +101,7 @@ static int dfa_read_packet(AVFormatContext *s, AVPacket *pkt) frame_size = AV_RL32(pkt->data + pkt->size - 8); if (frame_size > INT_MAX - 4) { av_log(s, AV_LOG_ERROR, "Too large chunk size: %"PRIu32"\n", frame_size); + av_packet_unref(pkt); return AVERROR(EIO); } if (AV_RL32(pkt->data + pkt->size - 12) == MKTAG('E', 'O', 'F', 'R')) { |