This commit is contained in:
satej1210 2021-02-18 09:18:04 +01:00 committed by GitHub
commit 199aa03d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -212,6 +212,8 @@ information on what to include when reporting a bug.
combinaitons (#1598)
- [X11] Bugfix: Keys pressed simultaneously with others were not always
reported (#1112,#1415,#1472,#1616)
- [X11] Bugfix: Desktop Environment freezes when window width or height is
over 32767
- [Wayland] Removed support for `wl_shell` (#1443)
- [Wayland] Bugfix: The `GLFW_HAND_CURSOR` shape used the wrong image (#1432)
- [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled

View File

@ -162,10 +162,12 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
assert(title != NULL);
assert(width >= 0);
assert(height >= 0);
assert(width <= 32767);
assert(height <= 32767);
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
if (width <= 0 || height <= 0)
if (width <= 0 || height <= 0 || width > 32767 || height > 32767)
{
_glfwInputError(GLFW_INVALID_VALUE,
"Invalid window size %ix%i",
@ -941,10 +943,12 @@ GLFWAPI void glfwSetWindowMonitor(GLFWwindow* wh,
assert(window != NULL);
assert(width >= 0);
assert(height >= 0);
assert(width <= 32767);
assert(height <= 32767);
_GLFW_REQUIRE_INIT();
if (width <= 0 || height <= 0)
if (width <= 0 || height <= 0 || width > 32767 || height > 32767)
{
_glfwInputError(GLFW_INVALID_VALUE,
"Invalid window size %ix%i",