diff options
Diffstat (limited to 'storage/innobase/dict/dict0mem.cc')
-rw-r--r-- | storage/innobase/dict/dict0mem.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc index c9988997801..7fc8ab79395 100644 --- a/storage/innobase/dict/dict0mem.cc +++ b/storage/innobase/dict/dict0mem.cc @@ -448,7 +448,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 |