History

avcodec/tiff: Fix leak of geotags[].val

Fixes: 2176/clusterfuzz-testcase-minimized-5908197216878592

Michael Niedermayer committed 9 years ago

Commit 22a25ab1 parent 1197c041 file · +2 −0Browse files

Unified · Split

libavcodec/tiff.c+2−0
@@ -1114,6 +1114,8 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) · 1113 unmodified lines
11141114 if (s->geotags[i].count == 0
11151115 || s->geotags[i].offset + s->geotags[i].count > count) {
11161116 av_log(s->avctx, AV_LOG_WARNING, "Invalid GeoTIFF key %d\n", s->geotags[i].key);
1117+ } else if (s->geotags[i].val) {
1118+ av_log(s->avctx, AV_LOG_WARNING, "Duplicate GeoTIFF key %d\n", s->geotags[i].key);
11171119 } else {
11181120 char *ap = doubles2str(&dp[s->geotags[i].offset], s->geotags[i].count, ", ");
11191121 if (!ap) {

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