summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-01-20 16:15:05 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-01-20 16:15:05 +0100
commit3a1716a7e79e6fe05a166211002321f73465ec79 (patch)
tree8b9eeab4e037c893ea4cd994b5a7d9e1b1825f5b /sql-common
parentd07664498be9c71c01c7df9f2fb1d18c7060b2e3 (diff)
parent7993f893b844d71183956ee30a6fb37fc10ae90c (diff)
downloadmariadb-git-3a1716a7e79e6fe05a166211002321f73465ec79.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 4624c6e0f6c..d621a16b63b 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -3348,7 +3348,10 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
scramble_data_len= pkt_scramble_len;
scramble_plugin= scramble_data + scramble_data_len;
if (scramble_data + scramble_data_len > pkt_end)
- scramble_data_len= (int)(pkt_end - scramble_data);
+ {
+ set_mysql_error(mysql, CR_MALFORMED_PACKET, unknown_sqlstate);
+ goto error;
+ }
}
else
{