mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 04:34:48 +00:00
comctl32: Fix integer overflow in DPA_Search.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
This commit is contained in:
parent
561a5b8f84
commit
58571710ba
|
@ -859,7 +859,7 @@ INT WINAPI DPA_Search (HDPA hdpa, LPVOID pFind, INT nStart,
|
||||||
r = hdpa->nItemCount - 1;
|
r = hdpa->nItemCount - 1;
|
||||||
lpPtr = hdpa->ptrs;
|
lpPtr = hdpa->ptrs;
|
||||||
while (r >= l) {
|
while (r >= l) {
|
||||||
x = (l + r) / 2;
|
x = l + (r - l) / 2;
|
||||||
n = (pfnCompare)(pFind, lpPtr[x], lParam);
|
n = (pfnCompare)(pFind, lpPtr[x], lParam);
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return x;
|
return x;
|
||||||
|
|
Loading…
Reference in a new issue