[FFmpeg-cvslog] avformat/dfa: Fix packet leak on error
Michael Niedermayer
git at videolan.org
Mon Jan 11 17:55:33 CET 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Jan 11 17:08:07 2016 +0100| [c71999ef97b7cc8b1cb6eaf39e72e9ecbf825d9e] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c71999ef97b7cc8b1cb6eaf39e72e9ecbf825d9e
---
libavformat/dfa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/dfa.c b/libavformat/dfa.c
index 40e3fad..b16672c 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')) {
More information about the ffmpeg-cvslog
mailing list