[FFmpeg-cvslog] avcodec/tiff: Fix leak of geotags[].val
Michael Niedermayer
git at videolan.org
Thu Aug 24 15:03:36 EEST 2017
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jun 11 01:05:26 2017 +0200| [f0f9fa21846023d3c9522d6e32e70ea7ecf879d6] | committer: Michael Niedermayer
avcodec/tiff: Fix leak of geotags[].val
Fixes: 2176/clusterfuzz-testcase-minimized-5908197216878592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 22a25ab3896cbb8dceebdba4d439e8b2b398ff0e)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f0f9fa21846023d3c9522d6e32e70ea7ecf879d6
---
libavcodec/tiff.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index c46f771565..d026a5bd98 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -1096,6 +1096,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
if (s->geotags[i].count == 0
|| s->geotags[i].offset + s->geotags[i].count > count) {
av_log(s->avctx, AV_LOG_WARNING, "Invalid GeoTIFF key %d\n", s->geotags[i].key);
+ } else if (s->geotags[i].val) {
+ av_log(s->avctx, AV_LOG_WARNING, "Duplicate GeoTIFF key %d\n", s->geotags[i].key);
} else {
char *ap = doubles2str(&dp[s->geotags[i].offset], s->geotags[i].count, ", ");
if (!ap) {
More information about the ffmpeg-cvslog
mailing list