summaryrefslogtreecommitdiff
path: root/sql-common/client.c
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-01-21 09:11:14 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-01-21 09:11:14 +0100
commitade89fc8980a0b2763734815df7634a129c6d5dc (patch)
tree5b5056d4a183241a8d0a6e2e93d304833934d2e6 /sql-common/client.c
parentbc43bf3e430c20bc2178e584215bd443054709d6 (diff)
parenta5b38151c0c020633ff2f3bbd18901427039f5b4 (diff)
downloadmariadb-git-ade89fc8980a0b2763734815df7634a129c6d5dc.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql-common/client.c')
-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 6d3b5a69b44..158b817ae59 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -3341,7 +3341,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
{