Andrey Turkin andrey.turkin@gmail.com writes:
@@ -494,7 +494,11 @@ static int ProcessWindowsFileProtection(void) strcatW( dllcache, dllcacheW ); }
- find_handle = FindFirstFileW(dllcache,&finddata);
- dllcache_wildcard = HeapAlloc(GetProcessHeap(), 0, strlenW( dllcache )*sizeof(WCHAR) + sizeof(wildcardW));
- strcpyW(dllcache_wildcard,dllcache);
- strcatW(dllcache_wildcard,wildcardW);
- find_handle = FindFirstFileW( dllcache_wildcard, &finddata );
You could simply remove the wildcard from the end of string after FindFirstFile, no need to copy the whole string.