Module: wine Branch: master Commit: 0b64b866a42b9a5a00f835047363ac076d24436d URL: http://source.winehq.org/git/wine.git/?a=commit;h=0b64b866a42b9a5a00f8350473...
Author: Tomasz Jezierski developers@tefnet.pl Date: Wed Apr 9 10:03:58 2008 +0200
hhctrl.ocx: Fix for writing outside allocated memory in HH_AddToolbar.
---
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);