[FFmpeg-cvslog] avformat/flvenc: Fix leak of oversized packets
Andreas Rheinhardt
git at videolan.org
Fri Dec 27 00:04:51 EET 2019
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Dec 26 11:53:35 2019 +0100| [b0d0d7e4d0581ccfeea37cc3fd0d3ca9d999fbfc] | committer: Michael Niedermayer
avformat/flvenc: Fix leak of oversized packets
Might happen for annex B H.264.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0d0d7e4d0581ccfeea37cc3fd0d3ca9d999fbfc
---
libavformat/flvenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index f6379cbe05..1aaf0333ca 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -992,7 +992,8 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
if (size + flags_size >= 1<<24) {
av_log(s, AV_LOG_ERROR, "Too large packet with size %u >= %u\n",
size + flags_size, 1<<24);
- return AVERROR(EINVAL);
+ ret = AVERROR(EINVAL);
+ goto fail;
}
avio_wb24(pb, size + flags_size);
More information about the ffmpeg-cvslog
mailing list