mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 05:57:27 +00:00
secur32: QueryContextAttributesW check for valid object before use.
This commit is contained in:
parent
1b1f8d914e
commit
cbddd3930b
|
@ -1149,8 +1149,8 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
|
||||||
TRACE("context_handle %p, attribute %#lx, buffer %p\n",
|
TRACE("context_handle %p, attribute %#lx, buffer %p\n",
|
||||||
context_handle, attribute, buffer);
|
context_handle, attribute, buffer);
|
||||||
|
|
||||||
if (!context_handle) return SEC_E_INVALID_HANDLE;
|
if (!context_handle || !(ctx = schan_get_object(context_handle->dwLower, SCHAN_HANDLE_CTX)))
|
||||||
ctx = schan_get_object(context_handle->dwLower, SCHAN_HANDLE_CTX);
|
return SEC_E_INVALID_HANDLE;
|
||||||
|
|
||||||
switch(attribute)
|
switch(attribute)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1529,6 +1529,10 @@ static void test_communication(void)
|
||||||
|
|
||||||
done:
|
done:
|
||||||
DeleteSecurityContext(&context);
|
DeleteSecurityContext(&context);
|
||||||
|
|
||||||
|
status = QueryContextAttributesW(&context, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (void*)&cert);
|
||||||
|
ok(status == SEC_E_INVALID_HANDLE, "QueryContextAttributesW(SECPKG_ATTR_REMOTE_CERT_CONTEXT) got %08lx\n", status);
|
||||||
|
|
||||||
FreeCredentialsHandle(&cred_handle);
|
FreeCredentialsHandle(&cred_handle);
|
||||||
|
|
||||||
CertFreeCertificateContext(cert);
|
CertFreeCertificateContext(cert);
|
||||||
|
|
Loading…
Reference in a new issue