mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avcodec/pictordec: Check plane value before doing value/mask computations
Fixes integer overflow Fixes: 675/clusterfuzz-testcase-6722971232108544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 63e400a8807dca7b0ffa3841df2e31f7419abb8d) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5a4709e9e3
commit
e8fb38f48c
@ -77,10 +77,10 @@ static void picmemset(PicContext *s, AVFrame *frame, int value, int run,
|
||||
if (*y < 0) {
|
||||
*y = s->height - 1;
|
||||
*plane += 1;
|
||||
value <<= bits_per_plane;
|
||||
mask <<= bits_per_plane;
|
||||
if (*plane >= s->nb_planes)
|
||||
return;
|
||||
value <<= bits_per_plane;
|
||||
mask <<= bits_per_plane;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user