fdisk: placate warning of strncpy not copying NUL byte
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
c96bb2c5ab
commit
8ef9effaa5
@ -425,7 +425,7 @@ create_sgiinfo(void)
|
|||||||
/* I keep SGI's habit to write the sgilabel to the second block */
|
/* I keep SGI's habit to write the sgilabel to the second block */
|
||||||
sgilabel->directory[0].vol_file_start = SGI_SSWAP32(2);
|
sgilabel->directory[0].vol_file_start = SGI_SSWAP32(2);
|
||||||
sgilabel->directory[0].vol_file_size = SGI_SSWAP32(sizeof(sgiinfo));
|
sgilabel->directory[0].vol_file_size = SGI_SSWAP32(sizeof(sgiinfo));
|
||||||
strncpy((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8);
|
memcpy((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static sgiinfo *fill_sgiinfo(void);
|
static sgiinfo *fill_sgiinfo(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user