Skip to content

Commit 55c99f2

Browse files
David LaightMikulas Patocka
authored andcommitted
dm-zoned-metadata: Use strscpy() to copy device name
Replace strcpy with strscpy in drivers/md/dm-zoned-metadata.c. Signed-off-by: David Laight <david.laight.linux@gmail.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
1 parent af8ce93 commit 55c99f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/md/dm-zoned-metadata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2871,7 +2871,7 @@ int dmz_ctr_metadata(struct dmz_dev *dev, int num_dev,
28712871
if (!zmd)
28722872
return -ENOMEM;
28732873

2874-
strcpy(zmd->devname, devname);
2874+
strscpy(zmd->devname, devname);
28752875
zmd->dev = dev;
28762876
zmd->nr_devs = num_dev;
28772877
zmd->mblk_rbtree = RB_ROOT;

0 commit comments

Comments
 (0)