mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-17 04:29:44 +00:00
swscale/swscale: Do not crash on floats
Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int' Fixes: division by zero Fixes: 391981061/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6691017763389440 Fixes: 392929028/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5142088307507200 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
ce538ef97a
commit
d16a058dbc
@ -623,7 +623,7 @@ av_cold void ff_sws_init_range_convert(SwsInternal *c)
|
||||
{
|
||||
c->lumConvertRange = NULL;
|
||||
c->chrConvertRange = NULL;
|
||||
if (c->opts.src_range != c->opts.dst_range && !isAnyRGB(c->opts.dst_format)) {
|
||||
if (c->opts.src_range != c->opts.dst_range && !isAnyRGB(c->opts.dst_format) && c->dstBpc < 32) {
|
||||
init_range_convert_constants(c);
|
||||
if (c->dstBpc <= 14) {
|
||||
if (c->opts.src_range) {
|
||||
|
Loading…
Reference in New Issue
Block a user