Browse Source

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>
tags/n3.3
Michael Niedermayer 9 years ago
parent
commit
bac9c03ed9
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/movtextdec.c

+ 2
- 0
libavcodec/movtextdec.c View File

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


Loading…
Cancel
Save