mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 14:30:57 +00:00
Do some boundschecking on iOrder. Fixes bug 770.
svn path=/trunk/; revision=17887
This commit is contained in:
parent
7f46bf47f7
commit
0f6d6950a2
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue