mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
Fix a case of deleted memory modification
cnctAuth and port->port_srv_auth point to the same object so useResponse must not be assigned if the object is deleted.
This commit is contained in:
parent
75042b58e1
commit
258584ff6d
@ -2014,13 +2014,15 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
|
|||||||
{
|
{
|
||||||
ConnectAuth* cnctAuth = FB_NEW ConnectAuth(port, id);
|
ConnectAuth* cnctAuth = FB_NEW ConnectAuth(port, id);
|
||||||
port->port_srv_auth = cnctAuth;
|
port->port_srv_auth = cnctAuth;
|
||||||
if (port->port_srv_auth->authenticate(send, ServerAuth::AUTH_COND_ACCEPT))
|
|
||||||
|
if (cnctAuth->authenticate(send, ServerAuth::AUTH_COND_ACCEPT))
|
||||||
{
|
{
|
||||||
delete port->port_srv_auth;
|
delete cnctAuth;
|
||||||
port->port_srv_auth = NULL;
|
port->port_srv_auth = NULL;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
cnctAuth->useResponse = true;
|
||||||
|
|
||||||
cnctAuth->useResponse = true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user