From d8b2895527ba63bf6db399d516b2d840f2cd4020 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Thu, 12 Mar 2020 11:13:39 +0800 Subject: [PATCH] bugfixing: Bad checking cursor width and height in `LoadCursorFromMem` --- src/kernel/cursor-comm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel/cursor-comm.c b/src/kernel/cursor-comm.c index f4a9144d..7f0e615e 100644 --- a/src/kernel/cursor-comm.c +++ b/src/kernel/cursor-comm.c @@ -189,7 +189,8 @@ static HCURSOR load_cursor_from_mem (const void* area) p += sizeof (DWORD32); imagew = MGUI_ReadLE32Mem (&p); imageh = MGUI_ReadLE32Mem (&p); - if (imagew > 32 || imageh > 32) { + /* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */ + if (imagew != CURSORWIDTH || imageh != (CURSORHEIGHT*2)) { goto error; }