wintrust: Record full catalog filename in catalog info structure, not just the basename.
This commit is contained in:
parent
5a25ffe435
commit
21d5f4a617
@ -134,19 +134,19 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile,
|
|||||||
{
|
{
|
||||||
FIXME("NULL basename not handled\n");
|
FIXME("NULL basename not handled\n");
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!ca || ca->magic != CATADMIN_MAGIC || !catalogFile || flags)
|
if (!ca || ca->magic != CATADMIN_MAGIC || !catalogFile || flags)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = strlenW(ca->path) + strlenW(selectBaseName) + 2;
|
len = strlenW(ca->path) + strlenW(selectBaseName) + 2;
|
||||||
if (!(target = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
|
if (!(target = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_OUTOFMEMORY);
|
SetLastError(ERROR_OUTOFMEMORY);
|
||||||
return FALSE;
|
return NULL;
|
||||||
}
|
}
|
||||||
strcpyW(target, ca->path);
|
strcpyW(target, ca->path);
|
||||||
strcatW(target, slashW);
|
strcatW(target, slashW);
|
||||||
@ -161,10 +161,10 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile,
|
|||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, target);
|
HeapFree(GetProcessHeap(), 0, target);
|
||||||
SetLastError(ERROR_OUTOFMEMORY);
|
SetLastError(ERROR_OUTOFMEMORY);
|
||||||
return FALSE;
|
return NULL;
|
||||||
}
|
}
|
||||||
ci->magic = CATINFO_MAGIC;
|
ci->magic = CATINFO_MAGIC;
|
||||||
strcpyW(ci->file, selectBaseName);
|
strcpyW(ci->file, target);
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, target);
|
HeapFree(GetProcessHeap(), 0, target);
|
||||||
return ci;
|
return ci;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user