diff --git a/controls/icontitle.c b/controls/icontitle.c
index 1e9fe27eb292d5a2e32a3c816a47c82f376828fb..f209e5ab3383a06023137ca26363042d0e55a564 100644
--- a/controls/icontitle.c
+++ b/controls/icontitle.c
@@ -70,7 +70,7 @@ static BOOL ICONTITLE_GetTitlePos( WND* wnd, LPRECT lpRect )
 
     if( length )
     {
-	str = HeapAlloc( GetProcessHeap(), 0, length + 1 );
+	str = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR) );
 	lstrcpyW( str, wnd->owner->text );
 	while( str[length - 1] == ' ' ) /* remove trailing spaces */
 	{