From e28c28b461af64d2a3d3e16a5d85785a5ee36518 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 4 Apr 2009 17:57:09 +0200 Subject: [PATCH] comctl32: Avoid potential overflow in Search Param (Coverity 903). --- dlls/comctl32/listview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index caf82b931b..9d1b4ffcad 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -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; -- 2.32.0.93.g670b81a890