Skip to content

Commit be5ec23

Browse files
committed
fix: changed strcpy for strncpy
1 parent 81e2a9c commit be5ec23

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libltfs/tape.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ int tape_set_cart_coherency(struct device_data *dev, const tape_partition_t part
17821782
/* APPLICATION CLIENT SPECIFIC INFORMATION LENGTH */
17831783
coh_data[30] = 0; /* Size of APPLICATION CLIENT SPECIFIC INFORMATION (Byte 1) */
17841784
coh_data[31] = 43; /* Size of APPLICATION CLIENT SPECIFIC INFORMATION (Byte 0) */
1785-
arch_strcpy((char *)coh_data + 32,5, "LTFS");
1785+
arch_strncpy((char *)coh_data + 32,"LTFS", 5, 4);
17861786
memcpy(coh_data + 37, coh->uuid, 37);
17871787
/*
17881788
Version field

0 commit comments

Comments
 (0)