[FFmpeg-cvslog] avcodec/adpcmenc: Fix leak of trellis buffer with ADPCM_IMA_AMV
Andreas Rheinhardt
git at videolan.org
Thu Nov 12 08:50:01 EET 2020
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Nov 12 07:15:29 2020 +0100| [454bee5be0c3721a5ca0b3b08cb6ed076f6c9e13] | committer: Andreas Rheinhardt
avcodec/adpcmenc: Fix leak of trellis buffer with ADPCM_IMA_AMV
Fixes Coverity ID 1469181.
Reviewed-by: Zane van Iperen <zane at zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=454bee5be0c3721a5ca0b3b08cb6ed076f6c9e13
---
libavcodec/adpcmenc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 20568cfc89..4bab004dac 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -876,6 +876,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
bytestream_put_byte(&dst, (buf[2 * i] << 4) | buf[2 * i + 1]);
samples += 2 * n;
+ av_free(buf);
} else for (n = frame->nb_samples >> 1; n > 0; n--) {
int nibble;
nibble = adpcm_ima_compress_sample(&c->status[0], *samples++) << 4;
More information about the ffmpeg-cvslog
mailing list