1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/flvenc: Fix leak of oversized packets

Might happen for annex B H.264.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Andreas Rheinhardt 2019-12-26 11:53:35 +01:00 committed by Michael Niedermayer
parent 28d02524a0
commit b0d0d7e4d0

View File

@ -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);