Fix buffer sizes in PS extraction code

The code used 4 byte buffers for 2 byte values.
This commit is contained in:
Markus Mäkelä 2019-06-26 12:27:41 +03:00
parent 991067372d
commit 25a076d072
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -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)