summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-03-22 14:41:36 +0400
committerAlexander Barkov <bar@mariadb.com>2019-03-22 14:41:36 +0400
commit1c60f40868f6067be81a50198e1c72df08814adf (patch)
treed5570ecfa377236d527d3c6a1db2a6b508c5a005 /storage
parentf4484dfdbf2d78b0f357916ebd8ade024dd73c09 (diff)
parent50a8fc52988d13a5164a1a542b9d7a85e3ecc1c1 (diff)
downloadmariadb-git-1c60f40868f6067be81a50198e1c72df08814adf.tar.gz
Merge remote-tracking branch 'origin/10.2' into 10.3
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/dict/dict0mem.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc
index d3333de5ced..f919fb7b9cf 100644
--- a/storage/innobase/dict/dict0mem.cc
+++ b/storage/innobase/dict/dict0mem.cc
@@ -480,7 +480,8 @@ dict_mem_table_col_rename_low(
ut_ad(to_len <= NAME_LEN);
char from[NAME_LEN + 1];
- strncpy(from, s, NAME_LEN + 1);
+ strncpy(from, s, sizeof from - 1);
+ from[sizeof from - 1] = '\0';
if (from_len == to_len) {
/* The easy case: simply replace the column name in