diff options
-rw-r--r-- | cmd/zpool/zpool_main.c | 2 | ||||
-rw-r--r-- | module/icp/io/sha2_mod.c | 2 | ||||
-rw-r--r-- | module/zfs/zfs_ioctl.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index e512688b7..59e56bc0e 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -7440,7 +7440,7 @@ main(int argc, char **argv) */ char buf[16384]; int fd = open(ZFS_DEV, O_RDWR); - (void) strcpy((void *)buf, argv[2]); + (void) strlcpy((void *)buf, argv[2], sizeof (buf)); return (!!ioctl(fd, ZFS_IOC_POOL_FREEZE, buf)); } else { (void) fprintf(stderr, gettext("unrecognized " diff --git a/module/icp/io/sha2_mod.c b/module/icp/io/sha2_mod.c index fc5f96044..be0f7a42c 100644 --- a/module/icp/io/sha2_mod.c +++ b/module/icp/io/sha2_mod.c @@ -681,7 +681,7 @@ sha2_mac_init_ctx(sha2_hmac_ctx_t *ctx, void *keyval, uint_t length_in_bytes) { uint64_t ipad[SHA256_HMAC_BLOCK_SIZE / sizeof (uint64_t)]; uint64_t opad[SHA256_HMAC_BLOCK_SIZE / sizeof (uint64_t)]; - int i, block_size, blocks_per_int64 = 0; + int i, block_size = 0, blocks_per_int64 = 0; /* Determine the block size */ if (ctx->hc_mech_type <= SHA256_HMAC_GEN_MECH_INFO_TYPE) { diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 14de14826..0385bfcbb 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -4303,7 +4303,7 @@ zfs_ioc_recv(zfs_cmd_t *zc) strchr(zc->zc_value, '%')) return (SET_ERROR(EINVAL)); - (void) strcpy(tofs, zc->zc_value); + (void) strlcpy(tofs, zc->zc_value, sizeof (tofs)); tosnap = strchr(tofs, '@'); *tosnap++ = '\0'; |