Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-13 22:45:08 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-03-15 00:48:49 +0300
commit108b02e5471c1dae248200db694aba9b7b8555a8 (patch)
tree11e4492bbcb060f6e472462b4048530cee5cd390 /libavcodec/tiff.c
parent0728d9a281068add5898a8b51cd9c6f3b973ea31 (diff)
avcodec/tiff: Check for multiple geo key directories
Fixes memleak Fixes: 826/clusterfuzz-testcase-5316921379520512 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index efbd9791a5..456da5142b 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -1045,6 +1045,10 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
ADD_METADATA(count, "ModelTiepointTag", NULL);
break;
case TIFF_GEO_KEY_DIRECTORY:
+ if (s->geotag_count) {
+ avpriv_request_sample(s->avctx, "Multiple geo key directories\n");
+ return AVERROR_INVALIDDATA;
+ }
ADD_METADATA(1, "GeoTIFF_Version", NULL);
ADD_METADATA(2, "GeoTIFF_Key_Revision", ".");
s->geotag_count = ff_tget_short(&s->gb, s->le);