aboutsummaryrefslogtreecommitdiff
path: root/libavformat/img2dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer2019-06-12 21:20:04 +0200
committerMichael Niedermayer2019-06-25 13:30:09 +0200
commitbd3672ba75c7e4a4b0cb2b46b8b6c983d73a0107 (patch)
tree94cbe0ba6bc6cd94e8dd64ed6b859e572fafc059 /libavformat/img2dec.c
parent5ea7f2050050fd6a9177a9b618f2bb2d4add9230 (diff)
avformat/img2dec: Fix probe_buffer leak in ff_img_read_header()
Fixes: memleak Fixes: 15171/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5683881644130304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r--libavformat/img2dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index fe45c5e5ec..f8b4a655a5 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -356,6 +356,7 @@ int ff_img_read_header(AVFormatContext *s1)
}
if (s1->flags & AVFMT_FLAG_CUSTOM_IO) {
avio_seek(s1->pb, 0, SEEK_SET);
+ av_freep(&probe_buffer);
} else
ffio_rewind_with_probe_data(s1->pb, &probe_buffer, probe_buffer_size);
}