Author: gadamopoulos Date: Thu May 18 17:15:22 2017 New Revision: 74579 URL: http://svn.reactos.org/svn/reactos?rev=74579&view=rev Log: [UXTHEME] -Apply some suggestions by Thomas.
Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclient.c?rev=74579&r1=74578&r2=74579&view=diff ============================================================================== --- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Thu May 18 17:15:22 2017 @@ -119,11 +119,11 @@ len++; /* From now on this is the size of the buffer so include the null */ - if (len > 50) - { - pszText = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (len > ARRAYSIZE(buffer)) + { + pszText = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (!pszText) - return E_FAIL; + return E_OUTOFMEMORY; } InternalGetWindowText(pcontext->hWnd, pszText, len);