comctl32: Avoid potential overflow in Search Param (Coverity 903).
This commit is contained in:
parent
088790e8e4
commit
e28c28b461
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue