Fixes memleak Fixes: 2076/clusterfuzz-testcase-minimized-6542640243802112
Unified · Split
| @@ -1140,6 +1140,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) · 1139 unmodified lines | ||
| 1140 | 1140 | bytestream2_seek(&s->gb, pos + s->geotags[i].offset, SEEK_SET); |
| 1141 | 1141 | if (bytestream2_get_bytes_left(&s->gb) < s->geotags[i].count) |
| 1142 | 1142 | return AVERROR_INVALIDDATA; |
| 1143 | + if (s->geotags[i].val) | |
| 1144 | + return AVERROR_INVALIDDATA; | |
| 1143 | 1145 | ap = av_malloc(s->geotags[i].count); |
| 1144 | 1146 | if (!ap) { |
| 1145 | 1147 | av_log(s->avctx, AV_LOG_ERROR, "Error allocating temporary buffer\n"); |