History

avcodec/tiff: Avoid loosing allocated geotag values

Fixes memleak Fixes: 2076/clusterfuzz-testcase-minimized-6542640243802112

Michael Niedermayer committed 9 years ago

Commit d7cbeab1 parent 1e6ee861 file · +2 −0Browse files

Unified · Split

libavcodec/tiff.c+2−0
@@ -1140,6 +1140,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) · 1139 unmodified lines
1140 bytestream2_seek(&s->gb, pos + s->geotags[i].offset, SEEK_SET);1140 bytestream2_seek(&s->gb, pos + s->geotags[i].offset, SEEK_SET);
1141 if (bytestream2_get_bytes_left(&s->gb) < s->geotags[i].count)1141 if (bytestream2_get_bytes_left(&s->gb) < s->geotags[i].count)
1142 return AVERROR_INVALIDDATA;1142 return AVERROR_INVALIDDATA;
1143 if (s->geotags[i].val)
1144 return AVERROR_INVALIDDATA;
1143 ap = av_malloc(s->geotags[i].count);1145 ap = av_malloc(s->geotags[i].count);
1144 if (!ap) {1146 if (!ap) {
1145 av_log(s->avctx, AV_LOG_ERROR, "Error allocating temporary buffer\n");1147 av_log(s->avctx, AV_LOG_ERROR, "Error allocating temporary buffer\n");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t