Kevin Koltzau : riched20: Ensure copied text is terminated with a
null.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Feb 23 05:55:26 CST 2006
Module: wine
Branch: refs/heads/master
Commit: d52ae24b5e41f63e73baf6f7d3c8e37728a230a9
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d52ae24b5e41f63e73baf6f7d3c8e37728a230a9
Author: Kevin Koltzau <kevin at plop.org>
Date: Wed Feb 22 23:05:50 2006 -0500
riched20: Ensure copied text is terminated with a null.
---
dlls/riched20/clipboard.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/clipboard.c b/dlls/riched20/clipboard.c
index 0b35cb9..eb2824a 100644
--- a/dlls/riched20/clipboard.c
+++ b/dlls/riched20/clipboard.c
@@ -335,7 +335,8 @@ static HGLOBAL get_unicode_text(ME_TextE
len = lpchrg->cpMax-lpchrg->cpMin;
ret = GlobalAlloc(GMEM_MOVEABLE, sizeof(WCHAR)*(len+pars+1));
data = (WCHAR *)GlobalLock(ret);
- ME_GetTextW(editor, data, lpchrg->cpMin, len, TRUE);
+ len = ME_GetTextW(editor, data, lpchrg->cpMin, len, TRUE);
+ data[len] = 0;
GlobalUnlock(ret);
return ret;
}
More information about the wine-cvs
mailing list