diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-11 01:05:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-19 15:26:37 +0200 |
commit | f3ac7e40d6bf1a7f7b750fa8a4d4545a1faa79af (patch) | |
tree | 2e8996a8288cc4c7db41e765fa9d8204a69aadaa | |
parent | 5217145824bf1f18d154a0cc8a8b4f50ffc4b33c (diff) | |
download | ffmpeg-f3ac7e40d6bf1a7f7b750fa8a4d4545a1faa79af.tar.gz |
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@niedermayer.cc>
(cherry picked from commit 22a25ab3896cbb8dceebdba4d439e8b2b398ff0e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/tiff.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 81bf7ae54d..6d833cd992 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1111,6 +1111,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) { |