From abe78ef1600c87f7829f16265f6dc0fa557aa1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sat, 22 Feb 2020 23:33:41 +1100 Subject: [PATCH] Crash on mirror traffic #2552 --- lib/MySQL_Protocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MySQL_Protocol.cpp b/lib/MySQL_Protocol.cpp index 96629db62..40a00b719 100644 --- a/lib/MySQL_Protocol.cpp +++ b/lib/MySQL_Protocol.cpp @@ -2310,7 +2310,6 @@ void MySQL_ResultSet::init(MySQL_Protocol *_myprot, MYSQL_RES *_res, MYSQL *_my, resultset_completed=false; myprot=_myprot; mysql=_my; - MySQL_Data_Stream * c_myds = *(myprot->myds); if (buffer==NULL) { //if (_stmt==NULL) { // we allocate this buffer only for not prepared statements // removing the previous assumption. We allocate this buffer also for prepared statements @@ -2341,6 +2340,7 @@ void MySQL_ResultSet::init(MySQL_Protocol *_myprot, MYSQL_RES *_res, MYSQL *_my, if (myprot==NULL) { return; // this is a mirror } + MySQL_Data_Stream * c_myds = *(myprot->myds); if (c_myds->com_field_list==false) { myprot->generate_pkt_column_count(false,&pkt.ptr,&pkt.size,sid,num_fields,this); sid++;