Skip to content
Snippets Groups Projects
Commit 22a25ab3 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1197c048
No related branches found
No related tags found
No related merge requests found
...@@ -1114,6 +1114,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) ...@@ -1114,6 +1114,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
if (s->geotags[i].count == 0 if (s->geotags[i].count == 0
|| s->geotags[i].offset + s->geotags[i].count > count) { || 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); 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 { } else {
char *ap = doubles2str(&dp[s->geotags[i].offset], s->geotags[i].count, ", "); char *ap = doubles2str(&dp[s->geotags[i].offset], s->geotags[i].count, ", ");
if (!ap) { if (!ap) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment