Commit 1c0122d1 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

quartz: Don't assume that strlenW of a constant string can be determined at compile time.

Use sizeof instead to calculate the size of wszKeyName in FilterMapper2_CreateCategory.
parent 8d2af8e3
......@@ -41,6 +41,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
#define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
/* Unexposed IAMFilterData interface */
typedef struct IAMFilterData IAMFilterData;
......@@ -311,7 +313,7 @@ static HRESULT WINAPI FilterMapper2_CreateCategory(
{
LPWSTR wClsidAMCat = NULL;
LPWSTR wClsidCategory = NULL;
WCHAR wszKeyName[strlenW(wszClsidSlash) + strlenW(wszSlashInstance) + (CHARS_IN_GUID-1) * 2 + 1];
WCHAR wszKeyName[ARRAYSIZE(wszClsidSlash)-1 + ARRAYSIZE(wszSlashInstance)-1 + (CHARS_IN_GUID-1) * 2 + 1];
HKEY hKey = NULL;
LONG lRet;
HRESULT hr;
......
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