[USER32]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 4 Mar 2017 19:02:30 +0000 (19:02 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 4 Mar 2017 19:02:30 +0000 (19:02 +0000)
- Fix overflow check in SetScrollRange. CID 731535
CORE-12763 #resolve

svn path=/trunk/; revision=74059

reactos/win32ss/user/user32/controls/scrollbar.c

index ca51860..496985a 100644 (file)
@@ -1701,7 +1701,7 @@ SetScrollRange(HWND hWnd, INT nBar, INT nMinPos, INT nMaxPos, BOOL bRedraw)
   pWnd = ValidateHwnd(hWnd);
   if ( !pWnd ) return FALSE;
 
-  if ((nMaxPos - nMinPos) > MAXLONG)
+  if (((LONGLONG)nMaxPos - nMinPos) > MAXLONG)
   {
      SetLastError(ERROR_INVALID_SCROLLBAR_RANGE);
      return FALSE;