wordpad: Copy the correct amount of data with lstrcpynW (Coverity)

André Hentschel nerv at dawncrow.de
Sun Jul 19 16:30:15 CDT 2015


713265
---
 programs/wordpad/wordpad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c
index f1a7ceb..bb34f2e 100644
--- a/programs/wordpad/wordpad.c
+++ b/programs/wordpad/wordpad.c
@@ -1232,7 +1232,7 @@ static LRESULT handle_findmsg(LPFINDREPLACEW pFr)
         if (pFr->lpstrFindWhat != custom_data->findBuffer)
         {
             lstrcpynW(custom_data->findBuffer, pFr->lpstrFindWhat,
-                      sizeof(custom_data->findBuffer));
+                      sizeof(custom_data->findBuffer) / sizeof(WCHAR));
             pFr->lpstrFindWhat = custom_data->findBuffer;
         }
 
-- 
1.9.1




More information about the wine-patches mailing list