Commit 32d022d2 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mjpegdec: Fix stereo3d memleak

Fixes: 12937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-5714945346371584

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 160851bc
...@@ -1903,6 +1903,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) ...@@ -1903,6 +1903,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
type = get_bits(&s->gb, 8); type = get_bits(&s->gb, 8);
len -= 4; len -= 4;
av_freep(&s->stereo3d);
s->stereo3d = av_stereo3d_alloc(); s->stereo3d = av_stereo3d_alloc();
if (!s->stereo3d) { if (!s->stereo3d) {
goto out; goto out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment