diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-08 22:54:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-09 23:28:10 +0100 |
commit | bac9c03ed9328c63aba46e280ba408431b53fcb4 (patch) | |
tree | 9ec8986e1af608682bef9dd64dc9b77e843c30dd /libavcodec | |
parent | e2a4f1a9eb2c1ef3feed4a4f04db7629f2b61084 (diff) | |
download | ffmpeg-bac9c03ed9328c63aba46e280ba408431b53fcb4.tar.gz |
avcodec/movtextdec: run mov_text_cleanup() before overwriting pointers
Fixes: memleak
Fixes: 741/clusterfuzz-testcase-586996200452915
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/movtextdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c index 6de15004fc..fb5085c3e8 100644 --- a/libavcodec/movtextdec.c +++ b/libavcodec/movtextdec.c @@ -459,6 +459,8 @@ static int mov_text_decode_frame(AVCodecContext *avctx, end = ptr + FFMIN(2 + text_length, avpkt->size); ptr += 2; + mov_text_cleanup(m); + tsmb_size = 0; m->tracksize = 2 + text_length; m->style_entries = 0; |