Commit 0b64b866 authored by Tomasz Jezierski's avatar Tomasz Jezierski Committed by Alexandre Julliard

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

parent 5cc671ee
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment