Commit 31112675 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-17462 Heap corruption with auth_gssapi on Windows.

use FreeContextAttributes() on individual members of
SecPkgContext_NativeNames, not on the struct itself.
parent 1f8b0752
...@@ -103,7 +103,12 @@ static int get_client_name_from_context(CtxtHandle *ctxt, ...@@ -103,7 +103,12 @@ static int get_client_name_from_context(CtxtHandle *ctxt,
*p = 0; *p = 0;
} }
strncpy(name, native_names.sClientName, name_len); strncpy(name, native_names.sClientName, name_len);
FreeContextBuffer(&native_names);
if (native_names.sClientName)
FreeContextBuffer(native_names.sClientName);
if (native_names.sServerName)
FreeContextBuffer(native_names.sServerName);
return CR_OK; return CR_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment