From 827a4c3faa27e0c186452585b15094eee1119085 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:25:12 +0200 Subject: Merging upstream version 3.5.0+dfsg1. Signed-off-by: Daniel Baumann --- winpr/libwinpr/sspi/Kerberos/kerberos.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'winpr/libwinpr/sspi/Kerberos/kerberos.c') diff --git a/winpr/libwinpr/sspi/Kerberos/kerberos.c b/winpr/libwinpr/sspi/Kerberos/kerberos.c index b7b71f9..3cf7786 100644 --- a/winpr/libwinpr/sspi/Kerberos/kerberos.c +++ b/winpr/libwinpr/sspi/Kerberos/kerberos.c @@ -657,6 +657,7 @@ static BOOL kerberos_rd_tgt_token(const sspi_gss_data* token, char** target, krb *buf++ = '@'; strcpy(buf, str); + free(str); return TRUE; } else if (val == KRB_TGT_REP) @@ -1303,6 +1304,9 @@ static KRB_CONTEXT* get_context(PCtxtHandle phContext) return NULL; TCHAR* name = sspi_SecureHandleGetUpperPointer(phContext); + if (!name) + return NULL; + if (_tcscmp(KERBEROS_SSP_NAME, name) != 0) return NULL; return sspi_SecureHandleGetLowerPointer(phContext); -- cgit v1.2.3