* Snapshot name begins with @.
* Default to same fs as bookmark.
*/
- (void) strncpy(snapname, argv[1], sizeof (snapname));
+ (void) strlcpy(snapname, argv[1], sizeof (snapname));
*strchr(snapname, '#') = '\0';
(void) strlcat(snapname, argv[0], sizeof (snapname));
} else {
{
zfs_cmd_t zc = {"\0"};
- (void) strcpy(zc.zc_name, pool);
+ (void) strlcpy(zc.zc_name, pool, sizeof (zc.zc_name));
zc.zc_inject_record = *record;
zc.zc_guid = flags;
remove_mountpoint(cn->cn_handle);
(void) strlcpy(newname, dst, sizeof (newname));
- (void) strcat(newname, cn->cn_handle->zfs_name + strlen(src));
+ (void) strlcat(newname, cn->cn_handle->zfs_name + strlen(src),
+ sizeof (newname));
(void) strlcpy(cn->cn_handle->zfs_name, newname,
sizeof (cn->cn_handle->zfs_name));
if ((ofp = fdopen(di->outputfd, "w")) == NULL) {
di->zerr = errno;
- strncpy(di->errbuf, strerror(errno), sizeof (di->errbuf));
+ strlcpy(di->errbuf, strerror(errno), sizeof (di->errbuf));
(void) close(di->datafd);
return ((void *)-1);
}
dup = strdup(cmp);
dir = strtok(dup, "/");
while (dir) {
- strcat(cmp_name, "/");
- strcat(cmp_name, dir);
+ strlcat(cmp_name, "/", sizeof (cmp_name));
+ strlcat(cmp_name, dir, sizeof (cmp_name));
dir = strtok(NULL, "/");
}
free(dup);