Skip to content
Snippets Groups Projects
Commit 63e400a8 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 25e93aac
Branches
Tags
No related merge requests found
...@@ -77,10 +77,10 @@ static void picmemset(PicContext *s, AVFrame *frame, int value, int run, ...@@ -77,10 +77,10 @@ static void picmemset(PicContext *s, AVFrame *frame, int value, int run,
if (*y < 0) { if (*y < 0) {
*y = s->height - 1; *y = s->height - 1;
*plane += 1; *plane += 1;
value <<= bits_per_plane;
mask <<= bits_per_plane;
if (*plane >= s->nb_planes) if (*plane >= s->nb_planes)
return; return;
value <<= bits_per_plane;
mask <<= bits_per_plane;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment