From 25a076d0723ac2c55f36d866be2d54b81a7577cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 26 Jun 2019 12:27:41 +0300 Subject: [PATCH] Fix buffer sizes in PS extraction code The code used 4 byte buffers for 2 byte values. --- server/modules/protocol/MySQL/mysql_common.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/modules/protocol/MySQL/mysql_common.cc b/server/modules/protocol/MySQL/mysql_common.cc index 648ce60bc..4efded961 100644 --- a/server/modules/protocol/MySQL/mysql_common.cc +++ b/server/modules/protocol/MySQL/mysql_common.cc @@ -1299,8 +1299,8 @@ bool mxs_mysql_extract_ps_response(GWBUF* buffer, MXS_PS_RESPONSE* out) { bool rval = false; uint8_t id[MYSQL_PS_ID_SIZE]; - uint8_t cols[MYSQL_PS_ID_SIZE]; - uint8_t params[MYSQL_PS_ID_SIZE]; + uint8_t cols[MYSQL_PS_COLS_SIZE]; + uint8_t params[MYSQL_PS_PARAMS_SIZE]; uint8_t warnings[MYSQL_PS_WARN_SIZE]; if (gwbuf_copy_data(buffer, MYSQL_PS_ID_OFFSET, sizeof(id), id) == sizeof(id)