comctl32: Avoid potential overflow in Search Param (Coverity 903).

This commit is contained in:
Marcus Meissner 2009-04-04 17:57:09 +02:00 committed by Alexandre Julliard
parent 088790e8e4
commit e28c28b461
1 changed files with 1 additions and 1 deletions

View File

@ -1547,7 +1547,7 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
/* update the search parameters */
infoPtr->lastKeyPressTimestamp = GetTickCount();
if (infoPtr->lastKeyPressTimestamp - lastKeyPressTimestamp < KEY_DELAY) {
if (infoPtr->nSearchParamLength < MAX_PATH)
if (infoPtr->nSearchParamLength < MAX_PATH-1)
infoPtr->szSearchParam[infoPtr->nSearchParamLength++]=charCode;
if (infoPtr->charCode != charCode)
infoPtr->charCode = charCode = 0;