comctl32/dsa: Handle overflow in DSA_InsertItem().
Signed-off-by: Xiaoshan Sun <sunxs@is.iscas.ac.cn> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
430108c92a
commit
0d57ff3d1f
|
@ -267,6 +267,9 @@ INT WINAPI DSA_InsertItem (HDSA hdsa, INT nIndex, LPVOID pSrc)
|
|||
nNewItems = hdsa->nMaxCount + hdsa->nGrow;
|
||||
nSize = hdsa->nItemSize * nNewItems;
|
||||
|
||||
if (nSize / hdsa->nItemSize != nNewItems)
|
||||
return -1;
|
||||
|
||||
lpTemp = ReAlloc (hdsa->pData, nSize);
|
||||
if (!lpTemp)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue