mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
Problem: TODO in gssapi mechanism
Solution: remove it. Looking at the code: https://github.com/krb5/krb5/blob/master/src/lib/gssapi/mechglue/g_unseal.c#L55 gss_unwrap as the very first thing checks that plaintext is not a null pointer, which in our case it's true given it's on the stack, and then initialises its members to 0 length and null ptr. https://github.com/krb5/krb5/blob/master/src/lib/gssapi/mechglue/g_rel_buffer.c#L36 So it should be safe to release it in all cases, and the release API seems to check again if it's not a null pointer and then if the members are 0 length and null pointer it's a no-op.
This commit is contained in:
parent
77444e206c
commit
7be3efc936
@ -183,8 +183,6 @@ int zmq::gssapi_mechanism_base_t::decode_message (msg_t *msg_)
|
||||
|
||||
if (maj_stat != GSS_S_COMPLETE)
|
||||
{
|
||||
// TODO is it correct to release the plaintext buffer if gss_unwrap
|
||||
// did not succeed?
|
||||
gss_release_buffer (&min_stat, &plaintext);
|
||||
free (wrapped.value);
|
||||
session->get_socket ()->event_handshake_failed_protocol (
|
||||
|
Loading…
Reference in New Issue
Block a user