Vitaly Lipatov : avifil32: Fix buffer sizes.
Alexandre Julliard
julliard at winehq.org
Wed Dec 5 06:56:50 CST 2007
Module: wine
Branch: master
Commit: 23db2636fc15f3645fc2c3966d29f679b51e3aee
URL: http://source.winehq.org/git/wine.git/?a=commit;h=23db2636fc15f3645fc2c3966d29f679b51e3aee
Author: Vitaly Lipatov <lav at etersoft.ru>
Date: Sat Dec 1 19:35:24 2007 +0300
avifil32: Fix buffer sizes.
---
dlls/avifil32/api.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c
index 4027966..910c816 100644
--- a/dlls/avifil32/api.c
+++ b/dlls/avifil32/api.c
@@ -1065,9 +1065,9 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving)
HeapFree(GetProcessHeap(), 0, lp);
return AVIERR_ERROR;
}
- for (n = 0;RegEnumKeyW(hKey, n, szFileExt, sizeof(szFileExt)) == S_OK;n++) {
+ for (n = 0;RegEnumKeyW(hKey, n, szFileExt, sizeof(szFileExt)/sizeof(szFileExt[0])) == S_OK;n++) {
/* get CLSID to extension */
- size = sizeof(szValue)/sizeof(szValue[0]);
+ size = sizeof(szValue);
if (RegQueryValueW(hKey, szFileExt, szValue, &size) != S_OK)
break;
@@ -1116,7 +1116,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving)
for (n = 0; n <= count; n++) {
/* first the description */
if (n != 0) {
- size = sizeof(szValue)/sizeof(szValue[0]);
+ size = sizeof(szValue);
if (RegQueryValueW(hKey, lp[n].szClsid, szValue, &size) == S_OK) {
size = lstrlenW(szValue);
lstrcpynW(szFilter, szValue, cbFilter);
More information about the wine-cvs
mailing list