Fix segfault when querying non-existent SecurityProvider.

This commit is contained in:
Stefan Huehner 2005-11-07 16:39:00 +00:00 committed by Alexandre Julliard
parent fc94be1149
commit e1364b02a3
1 changed files with 8 additions and 3 deletions

View File

@ -573,16 +573,21 @@ static void SECUR32_initializeProviders(void)
SecurePackage *SECUR32_findPackageW(PWSTR packageName)
{
SecurePackage *ret = NULL;
BOOL matched = FALSE;
if (packageTable && packageName)
{
LIST_FOR_EACH_ENTRY(ret, &packageTable->table, SecurePackage, entry)
{
if (!lstrcmpiW(ret->infoW.Name, packageName))
break;
matched = !lstrcmpiW(ret->infoW.Name, packageName);
if (matched)
break;
}
if (ret && ret->provider && !ret->provider->loaded)
if (!matched)
return NULL;
if (ret->provider && !ret->provider->loaded)
{
ret->provider->lib = LoadLibraryW(ret->provider->moduleName);
if (ret->provider->lib)