From: Alex Henrie alexhenrie24@gmail.com
--- dlls/mscoree/corruntimehost.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index f5a3831c90e..d9864b4dcd2 100644 --- a/dlls/mscoree/corruntimehost.c +++ b/dlls/mscoree/corruntimehost.c @@ -1738,8 +1738,7 @@ HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj) WCHAR codebase[MAX_PATH + 8]; WCHAR classname[350], subkeyName[256]; WCHAR filename[MAX_PATH]; - - DWORD dwBufLen = 350; + DWORD dwBufLen;
lstrcpyW(path, wszCLSIDSlash); StringFromGUID2(clsid, path + lstrlenW(wszCLSIDSlash), CHARS_IN_GUID); @@ -1758,7 +1757,7 @@ HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj) HRESULT (WINAPI *pDllGetClassObject)(REFCLSID,REFIID,LPVOID*); IClassFactory *classfactory;
- dwBufLen = ARRAY_SIZE( filename ); + dwBufLen = sizeof( filename ); res = RegGetValueW( subkey, NULL, NULL, RRF_RT_REG_SZ, NULL, filename, &dwBufLen );
RegCloseKey( subkey ); @@ -1796,6 +1795,7 @@ HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj) goto cleanup; }
+ dwBufLen = sizeof( classname ); res = RegGetValueW( key, NULL, L"Class", RRF_RT_REG_SZ, NULL, classname, &dwBufLen); if(res != ERROR_SUCCESS) { @@ -1806,7 +1806,7 @@ HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj)
TRACE("classname (%s)\n", debugstr_w(classname));
- dwBufLen = MAX_PATH + 8; + dwBufLen = sizeof( codebase ); res = RegGetValueW( key, NULL, L"CodeBase", RRF_RT_REG_SZ, NULL, codebase, &dwBufLen); if(res == ERROR_SUCCESS) { @@ -1841,7 +1841,7 @@ HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj) res = RegOpenKeyExW(key, subkeyName, 0, KEY_READ, &subkey); if (res != ERROR_SUCCESS) goto cleanup; - dwBufLen = MAX_PATH + 8; + dwBufLen = sizeof( assemblyname ); res = RegGetValueW(subkey, NULL, L"Assembly", RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); RegCloseKey(subkey); if (res != ERROR_SUCCESS) @@ -1849,7 +1849,7 @@ HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj) } else { - dwBufLen = MAX_PATH + 8; + dwBufLen = sizeof( assemblyname ); res = RegGetValueW(key, NULL, L"Assembly", RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); if (res != ERROR_SUCCESS) goto cleanup;