=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: wordpad: Copy the correct amount of data with lstrcpynW (Coverity).

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 20 14:20:48 CDT 2015


Module: wine
Branch: master
Commit: b5c3408a5e2060792058b9db1c64b69c9efe9731
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b5c3408a5e2060792058b9db1c64b69c9efe9731

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun Jul 19 23:30:15 2015 +0200

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

---

 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;
         }
 




More information about the wine-cvs mailing list