From 1ebb998056630b7406c6c29502bac3e619c66f40 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Mon, 29 Feb 2016 16:53:39 +0200 Subject: [PATCH] Fixed wrong DCB being used in gw_get_shared_session_auth_info The caller DCB was used instead of the session client DCB. This caused a crash when a backend DCB was getting the shared data since those DCBs have a NULL data pointer. --- server/modules/protocol/mysql_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index db9469ccb..444f6c168 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -144,7 +144,7 @@ static bool gw_get_shared_session_auth_info(DCB* dcb, MYSQL_session* session) if (dcb->session->state != SESSION_STATE_ALLOC && dcb->session->state != SESSION_STATE_DUMMY) { - memcpy(session, dcb->data, sizeof(MYSQL_session)); + memcpy(session, dcb->session->client_dcb->data, sizeof(MYSQL_session)); } else {