mirror of
https://github.com/reactos/reactos.git
synced 2024-12-15 15:13:27 +08:00
[WIN32SS][NTUSER] Fix an integer underflow within scrollbar info setting
Thanks goes to I_Kill_Bugs for the patch (and partly to Kyle Katarn for the PR) and Hermes for tweaking the patch code. Had to make a commit myself as the PR author's account is deleted. Signed-off by: I_Kill_Bugs (original patch author) Signed-off by: Kyle Katarn <contact@kcsoftwares.com> Signed-off by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
This commit is contained in:
parent
66f6abfc4a
commit
ffea5152e6
@ -597,7 +597,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
||||
if (lpsi->fMask & (SIF_RANGE | SIF_PAGE | SIF_DISABLENOSCROLL))
|
||||
{
|
||||
new_flags = Window->pSBInfo->WSBflags;
|
||||
if (Info->nMin >= (int)(Info->nMax - max(Info->nPage - 1, 0)))
|
||||
if (Info->nMin + (int)max(Info->nPage, 1) > Info->nMax)
|
||||
{
|
||||
/* Hide or disable scroll-bar */
|
||||
if (lpsi->fMask & SIF_DISABLENOSCROLL)
|
||||
|
Loading…
Reference in New Issue
Block a user