mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/tiff: Update pointer only when the result is used
Fixes: runtime error: signed integer overflow: 538976288 * 32 cannot be represented in type 'int' Fixes: 2310/clusterfuzz-testcase-minimized-4534784887881728 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7e98da9c4f
commit
27f80ab016
@ -1306,6 +1306,8 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
stride = p->linesize[plane];
|
||||
dst = p->data[plane];
|
||||
for (i = 0; i < s->height; i += s->rps) {
|
||||
if (i)
|
||||
dst += s->rps * stride;
|
||||
if (s->stripsizesoff)
|
||||
ssize = ff_tget(&stripsizes, s->sstype, le);
|
||||
else
|
||||
@ -1326,7 +1328,6 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
return ret;
|
||||
break;
|
||||
}
|
||||
dst += s->rps * stride;
|
||||
}
|
||||
if (s->predictor == 2) {
|
||||
if (s->photometric == TIFF_PHOTOMETRIC_YCBCR) {
|
||||
|
Loading…
Reference in New Issue
Block a user