hhctrl.ocx: Fix for writing outside allocated memory in HH_AddToolbar.

This commit is contained in:
Tomasz Jezierski 2008-04-09 10:03:58 +02:00 committed by Alexandre Julliard
parent 5cc671eec5
commit 0b64b866a4
1 changed files with 1 additions and 1 deletions

View File

@ -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);