From 23db2636fc15f3645fc2c3966d29f679b51e3aee Mon Sep 17 00:00:00 2001 From: Vitaly Lipatov Date: Sat, 1 Dec 2007 19:35:24 +0300 Subject: [PATCH] avifil32: Fix buffer sizes. --- dlls/avifil32/api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index 40279662719..910c816be65 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);