mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1218217: bustage fix for static assert r=bustage
on a CLOSED TREE
This commit is contained in:
parent
ff02460522
commit
4dc034c5c3
@ -74,7 +74,7 @@ size_t CalcBufferSize(VideoType type, int width, int height) {
|
|||||||
// 0x7FFF * 0x7FFF * 4 = < 0x100000000
|
// 0x7FFF * 0x7FFF * 4 = < 0x100000000
|
||||||
assert(width <= 0x7FFF); // guarantees no overflow and cheaper than multiply
|
assert(width <= 0x7FFF); // guarantees no overflow and cheaper than multiply
|
||||||
assert(height <= 0x7FFF);
|
assert(height <= 0x7FFF);
|
||||||
static_assert(std::numeric_limits<std::size_t>::max() >= 0xFFFFFFFF, "size_t max too small!");
|
assert(std::numeric_limits<std::size_t>::max() >= 0xFFFFFFFF);
|
||||||
// assert() is debug only
|
// assert() is debug only
|
||||||
if (width > 0x7FFF || height > 0x7FFF) {
|
if (width > 0x7FFF || height > 0x7FFF) {
|
||||||
return SIZE_MAX; // very likely forces OOM
|
return SIZE_MAX; // very likely forces OOM
|
||||||
|
Loading…
Reference in New Issue
Block a user