diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-11 02:05:26 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-11 02:06:08 +0300 |
commit | 22a25ab3896cbb8dceebdba4d439e8b2b398ff0e (patch) | |
tree | ecf9af5930241ba5395478b0122f4ba81b1435b9 | |
parent | 1197c04896423c6c7db65f69da8bc3865b26bb50 (diff) |
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>
-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 90d16b1723..4612c78ee9 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1114,6 +1114,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) { |