Commit e8f5a93e authored by Janne Grunau's avatar Janne Grunau

film_grain: replace left shift of a signed value with a multiplication

Fixes an undefined left shift of a negative value in
clusterfuzz-testcase-minimized-dav1d_fuzzer-5707215277654016. Credits to
oss-fuzz.
parent 5098b23a
......@@ -418,7 +418,7 @@ static void apply_to_row_uv(Dav1dPicture *const out, const Dav1dPicture *const i
int combined = avg * data->uv_luma_mult[uv] + \
*src * data->uv_mult[uv]; \
val = iclip_pixel( (combined >> 6) + \
(data->uv_offset[uv] << (BITDEPTH - 8)) ); \
(data->uv_offset[uv] * (1 << (BITDEPTH - 8))) ); \
} \
\
int noise = round2(scaling[ val ] * (grain), data->scaling_shift); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment