mirror of
https://github.com/reactos/reactos.git
synced 2026-07-04 22:44:20 +08:00
Do some boundschecking on iOrder. Fixes bug 770.
svn path=/trunk/; revision=17887
This commit is contained in:
@@ -930,6 +930,10 @@ HEADER_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
nItem = infoPtr->uNumItem;
|
||||
|
||||
iOrder = (phdi->mask & HDI_ORDER) ? phdi->iOrder : nItem;
|
||||
if (iOrder < 0)
|
||||
iOrder = 0;
|
||||
else if (infoPtr->uNumItem < iOrder)
|
||||
iOrder = infoPtr->uNumItem;
|
||||
|
||||
if (infoPtr->uNumItem == 0) {
|
||||
infoPtr->items = Alloc (sizeof (HEADER_ITEM));
|
||||
|
||||
Reference in New Issue
Block a user