Skip to content

Commit 8a41907

Browse files
authored
Message in strncpy
1 parent 6ef93d4 commit 8a41907

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/libltfs/tape.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +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+
/* Size of the buffer to insert 'LTFS' needs to be size of 5 for the 4 letters and the null terminator*/
17851786
arch_strncpy((char *)coh_data + 32,"LTFS", 5, 4);
17861787
memcpy(coh_data + 37, coh->uuid, 37);
17871788
/*

0 commit comments

Comments
 (0)