mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Replace sprintf()->snprintf() and strcpy()->strlcpy()
The strcpy() and sprintf() functions are deprecated on some platforms. Care is needed to ensure correct size is used. If some platforms miss snprintf, we can add a #define to sprintf, likewise strlcpy(). The biggest change is adding a size parameter to zfs_id_to_fuidstr(). The various *_impl_get() functions are only used on linux and have not yet been updated. Reviewed by: Sean Eric Fagan <sef@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #10400
This commit is contained in:
@@ -843,7 +843,7 @@ gcm_impl_init(void)
|
||||
sizeof (gcm_fastest_impl));
|
||||
}
|
||||
|
||||
strcpy(gcm_fastest_impl.name, "fastest");
|
||||
strlcpy(gcm_fastest_impl.name, "fastest", GCM_IMPL_NAME_MAX);
|
||||
|
||||
#ifdef CAN_USE_GCM_ASM
|
||||
/*
|
||||
@@ -955,7 +955,7 @@ gcm_impl_set(const char *val)
|
||||
return (err);
|
||||
}
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#if defined(_KERNEL) && defined(__linux__)
|
||||
|
||||
static int
|
||||
icp_gcm_impl_set(const char *val, zfs_kernel_param_t *kp)
|
||||
|
||||
Reference in New Issue
Block a user