Hans Leidekker : kerberos: Avoid a crash on NULL expiry parameter.
Alexandre Julliard
julliard at winehq.org
Tue Jan 11 15:45:35 CST 2022
Module: wine
Branch: master
Commit: ea96a9c81715fe4e7d8cc5a0bc626f965c6b14e4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ea96a9c81715fe4e7d8cc5a0bc626f965c6b14e4
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Jan 11 13:34:50 2022 +0100
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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kerberos/krb5_ap.c | 1 +
dlls/secur32/tests/secur32.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/kerberos/krb5_ap.c b/dlls/kerberos/krb5_ap.c
index 8295d2e103e..2e47c23bb69 100644
--- a/dlls/kerberos/krb5_ap.c
+++ b/dlls/kerberos/krb5_ap.c
@@ -87,6 +87,7 @@ static void expiry_to_timestamp( ULONG expiry, TimeStamp *timestamp )
{
LARGE_INTEGER time;
+ if (!timestamp) return;
NtQuerySystemTime( &time );
RtlSystemTimeToLocalTime( &time, &time );
time.QuadPart += expiry * (ULONGLONG)10000000;
diff --git a/dlls/secur32/tests/secur32.c b/dlls/secur32/tests/secur32.c
index f6bca55561c..aa286c64732 100644
--- a/dlls/secur32/tests/secur32.c
+++ b/dlls/secur32/tests/secur32.c
@@ -418,7 +418,6 @@ static void test_SspiPrepareForCredWrite(void)
static void test_kerberos(void)
{
SecPkgInfoA *info;
- TimeStamp ttl;
CredHandle cred;
SECURITY_STATUS status;
@@ -460,7 +459,7 @@ static void test_kerberos(void)
FreeContextBuffer( info );
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 );
if(status == SEC_E_OK)
FreeCredentialHandle( &cred );
More information about the wine-cvs
mailing list