Andrew Talbot : msdmo: Array parameter is passed to function as pointer so loses size information .
Alexandre Julliard
julliard at winehq.org
Tue Apr 8 06:37:46 CDT 2008
Module: wine
Branch: master
Commit: a9200b24014607c4c82fb052b97de88daa804a81
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a9200b24014607c4c82fb052b97de88daa804a81
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Mon Apr 7 22:39:33 2008 +0100
msdmo: Array parameter is passed to function as pointer so loses size information.
---
dlls/msdmo/dmoreg.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c
index 9560234..f6d71bd 100644
--- a/dlls/msdmo/dmoreg.c
+++ b/dlls/msdmo/dmoreg.c
@@ -291,8 +291,9 @@ lend:
*
* Get DMP Name from the registry
*/
-HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR szName[80])
+HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR szName[])
{
+#define NAME_SIZE 80 /* Size of szName[] */
WCHAR szguid[64];
HRESULT hres;
HKEY hrkey = 0;
@@ -311,7 +312,7 @@ HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR szName[80])
if (ERROR_SUCCESS != hres)
goto lend;
- count = sizeof(szName);
+ count = NAME_SIZE;
hres = RegQueryValueExW(hkey, NULL, NULL, NULL,
(LPBYTE) szName, &count);
@@ -323,6 +324,7 @@ lend:
RegCloseKey(hkey);
return hres;
+#undef NAME_SIZE
}
More information about the wine-cvs
mailing list