diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-13 07:39:14 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-13 07:39:14 +0200 |
commit | a8566f727f4f6e0e0169e32706dd25f74fe2539a (patch) | |
tree | c8016d45a9fc0271a654d8a9f5b89334b18b65b2 /storage | |
parent | 2c8fa28f40315c237896980ea5fcc1801f7ba140 (diff) | |
download | mariadb-git-a8566f727f4f6e0e0169e32706dd25f74fe2539a.tar.gz |
Fix GCC 10 -Wstringop-truncation
Diffstat (limited to 'storage')
-rw-r--r-- | storage/perfschema/pfs_instr_class.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/perfschema/pfs_instr_class.cc b/storage/perfschema/pfs_instr_class.cc index c0a9adb6f2c..c75418b28e9 100644 --- a/storage/perfschema/pfs_instr_class.cc +++ b/storage/perfschema/pfs_instr_class.cc @@ -1,4 +1,5 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -619,6 +620,7 @@ static void init_instr_class(PFS_instr_class *klass, DBUG_ASSERT(name_length <= PFS_MAX_INFO_NAME_LENGTH); memset(klass, 0, sizeof(PFS_instr_class)); strncpy(klass->m_name, name, name_length); + klass->m_name[PFS_MAX_INFO_NAME_LENGTH - 1]= '\0'; klass->m_name_length= name_length; klass->m_flags= flags; klass->m_enabled= true; |