mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fedora 28: Fix misc bounds check compiler warnings
Fix a bunch of truncation compiler warnings that show up on Fedora 28 (GCC 8.0.1). Reviewed-by: Giuseppe Di Natale <guss80@gmail.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #7368 Closes #7826 Closes #7830
This commit is contained in:
committed by
Tony Hutter
parent
4356dd23a9
commit
3ea1f7f193
@@ -321,7 +321,7 @@ kcf_create_mech_entry(kcf_ops_class_t class, char *mechname)
|
||||
mutex_enter(&(me_tab[i].me_mutex));
|
||||
if (me_tab[i].me_name[0] == 0) {
|
||||
/* Found an empty spot */
|
||||
(void) strncpy(me_tab[i].me_name, mechname,
|
||||
(void) strlcpy(me_tab[i].me_name, mechname,
|
||||
CRYPTO_MAX_MECH_NAME);
|
||||
me_tab[i].me_name[CRYPTO_MAX_MECH_NAME-1] = '\0';
|
||||
me_tab[i].me_mechid = KCF_MECHID(class, i);
|
||||
|
||||
Reference in New Issue
Block a user