From fc82de7aa7e84bbce18cb93a6ef06a2dfa48c232 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 14 Apr 2022 14:06:58 -0400 Subject: [PATCH] alloy: win: Fix range check for system cursors (fixes issue #3270) --- libcef/browser/native/cursor_util_win.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcef/browser/native/cursor_util_win.cc b/libcef/browser/native/cursor_util_win.cc index 189bda2ee..4356c64cb 100644 --- a/libcef/browser/native/cursor_util_win.cc +++ b/libcef/browser/native/cursor_util_win.cc @@ -131,7 +131,8 @@ LPCWSTR ToCursorID(ui::mojom::CursorType type) { } bool IsSystemCursorID(LPCWSTR cursor_id) { - return cursor_id >= IDC_ARROW; // See WinUser.h + // Check the range of values from WinUser.h. + return cursor_id >= IDC_ARROW && cursor_id <= IDC_HELP; } } // namespace