Kai Blin : user32: If pTest was allocated, length has to be > 0 (Coverity).
Module: wine Branch: master Commit: 7bfe2b06c359965e8b314282f963f9dd696b4229 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7bfe2b06c359965e8b314282f9... Author: Kai Blin <kai.blin(a)gmail.com> Date: Fri Jan 5 12:40:56 2007 +0100 user32: If pTest was allocated, length has to be > 0 (Coverity). --- dlls/user32/combo.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 9674840..badb2ef 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -995,8 +995,7 @@ static INT CBUpdateLBox( LPHEADCOMBO lph if( pText ) { - if( length ) GetWindowTextW( lphc->hWndEdit, pText, length + 1); - else pText[0] = '\0'; + GetWindowTextW( lphc->hWndEdit, pText, length + 1); idx = SendMessageW(lphc->hWndLBox, LB_FINDSTRING, (WPARAM)(-1), (LPARAM)pText ); HeapFree( GetProcessHeap(), 0, pText );
participants (1)
-
Alexandre Julliard