kerberos: Avoid a crash on NULL expiry parameter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52353 Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
695c320507
commit
ea96a9c817
|
@ -87,6 +87,7 @@ static void expiry_to_timestamp( ULONG expiry, TimeStamp *timestamp )
|
||||||
{
|
{
|
||||||
LARGE_INTEGER time;
|
LARGE_INTEGER time;
|
||||||
|
|
||||||
|
if (!timestamp) return;
|
||||||
NtQuerySystemTime( &time );
|
NtQuerySystemTime( &time );
|
||||||
RtlSystemTimeToLocalTime( &time, &time );
|
RtlSystemTimeToLocalTime( &time, &time );
|
||||||
time.QuadPart += expiry * (ULONGLONG)10000000;
|
time.QuadPart += expiry * (ULONGLONG)10000000;
|
||||||
|
|
|
@ -418,7 +418,6 @@ static void test_SspiPrepareForCredWrite(void)
|
||||||
static void test_kerberos(void)
|
static void test_kerberos(void)
|
||||||
{
|
{
|
||||||
SecPkgInfoA *info;
|
SecPkgInfoA *info;
|
||||||
TimeStamp ttl;
|
|
||||||
CredHandle cred;
|
CredHandle cred;
|
||||||
SECURITY_STATUS status;
|
SECURITY_STATUS status;
|
||||||
|
|
||||||
|
@ -460,7 +459,7 @@ static void test_kerberos(void)
|
||||||
FreeContextBuffer( info );
|
FreeContextBuffer( info );
|
||||||
|
|
||||||
status = AcquireCredentialsHandleA( NULL, provider, SECPKG_CRED_OUTBOUND, NULL,
|
status = AcquireCredentialsHandleA( NULL, provider, SECPKG_CRED_OUTBOUND, NULL,
|
||||||
NULL, NULL, NULL, &cred, &ttl );
|
NULL, NULL, NULL, &cred, NULL );
|
||||||
todo_wine ok( status == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", status );
|
todo_wine ok( status == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", status );
|
||||||
if(status == SEC_E_OK)
|
if(status == SEC_E_OK)
|
||||||
FreeCredentialHandle( &cred );
|
FreeCredentialHandle( &cred );
|
||||||
|
|
Loading…
Reference in New Issue