diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index 6123020f78b5..96ac426221d1 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -4539,7 +4539,7 @@ zpool_get_bootenv(zpool_handle_t *zhp, char *outbuf, size_t size, off_t offset) return (0); } - strlcpy(outbuf, envmap + offset, size); + strncpy(outbuf, envmap + offset, size); int bytes = MIN(strlen(envmap + offset), size); fnvlist_free(nvl); return (bytes);