History

avcodec/tiff: add a zero DNG_LINEARIZATION_TABLE check

Fixes: index 4294967295 out of bounds for type 'uint16_t [65536]' Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5950405086674944 Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6666195176914944

Michael Niedermayer committed 3 years ago

Commit 6e98cf01 parent 19b66b81 file · +1 −1Browse files

Unified · Split

libavcodec/tiff.c+1−1
@@ -1451,7 +1451,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) · 1450 unmodified lines
14511451 break;
14521452 case TIFF_GRAY_RESPONSE_CURVE:
14531453 case DNG_LINEARIZATION_TABLE:
1454− if (count > FF_ARRAY_ELEMS(s->dng_lut))
1454+ if (count < 1 || count > FF_ARRAY_ELEMS(s->dng_lut))
14551455 return AVERROR_INVALIDDATA;
14561456 for (int i = 0; i < count; i++)
14571457 s->dng_lut[i] = ff_tget(&s->gb, type, s->le);

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