Fixed potential buffer overflow in YUV conversion
Fixes https://github.com/libsdl-org/SDL/issues/5043
This commit is contained in:
1 parent
09465a9083
commit
8589134f16
1 file changed
+1
-1
@@ -91,7 +91,7 @@ static uint8_t clampU8(int32_t v)
|
|||||||
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
|
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
|
||||||
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
|
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
|
||||||
};
|
};
|
||||||
return lut[(v+128*PRECISION_FACTOR)>>PRECISION];
|
return lut[((v+128*PRECISION_FACTOR)>>PRECISION)&511];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user