}
fd = dirfd(dirstream);
if (device)
- strcpy(args.name, device);
+ strncpy_null(args.name, device);
else
args.name[0] = '\0';
#include "ctree.h"
#include "ioctl.h"
#include "commands.h"
+#include "utils.h"
#include "list.h"
#include "send.h"
}
memset(&args_v1, 0, sizeof(args_v1));
- strcpy(args_v1.name, path);
+ strncpy_null(args_v1.name, path);
ret = ioctl(r->mnt_fd, BTRFS_IOC_SUBVOL_CREATE, &args_v1);
if (ret < 0) {
ret = -errno;
}
memset(&args_v2, 0, sizeof(args_v2));
- strcpy(args_v2.name, path);
+ strncpy_null(args_v2.name, path);
r->parent_subvol = subvol_uuid_search(&r->sus, 0, parent_uuid,
parent_ctransid, NULL, subvol_search_by_received_uuid);