[PATCH 4/6] secur32: Validate the context handle in schan_InitializeSecurityContextW().
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> --- dlls/secur32/schannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index fdf8e990f62..5b1a910a361 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -984,7 +984,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( SIZE_T record_size = 0; unsigned char *ptr; - ctx = schan_get_object(phContext->dwLower, SCHAN_HANDLE_CTX); + if (!(ctx = schan_get_object(phContext->dwLower, SCHAN_HANDLE_CTX))) return SEC_E_INVALID_HANDLE; if (pInput) { idx = schan_find_sec_buffer_idx(pInput, 0, SECBUFFER_TOKEN); -- 2.30.2
participants (1)
-
Hans Leidekker