Fix for writing outside allocated memory in HH_AddToolbar described in: http://bugs.winehq.org/show_bug.cgi?id=6801#c15

Tomasz Jezierski - Tefnet developers at tefnet.pl
Wed Apr 9 03:03:58 CDT 2008


---
 dlls/hhctrl.ocx/help.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c
index 3ee522e..900cfd9 100644
--- a/dlls/hhctrl.ocx/help.c
+++ b/dlls/hhctrl.ocx/help.c
@@ -575,7 +575,7 @@ static BOOL HH_AddToolbar(HHInfo *pHHInfo)
     {
         LPWSTR szBuf = HH_LoadString(buttons[dwIndex].idCommand);
         DWORD dwLen = strlenW(szBuf);
-        szBuf[dwLen + 2] = 0; /* Double-null terminate */
+        szBuf[dwLen + 1] = 0; /* Double-null terminate */
 
         buttons[dwIndex].iString = (DWORD)SendMessageW(hToolbar, TB_ADDSTRINGW, 0, (LPARAM)szBuf);
         heap_free(szBuf);
-- 
1.5.3.7


--=-Hn7XbB7Kqowk2klNcE3Q--




More information about the wine-patches mailing list