diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-06-26 15:44:58 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-06-26 15:44:58 +0200 |
commit | 8ef9effaa558fbbf7e0f3b91a3faa4074686e671 (patch) | |
tree | 71bbbeee633d0e4051eff352df2180dd23d88100 /util-linux | |
parent | c96bb2c5ab2772d649c67a716615a72f4aca9cd3 (diff) | |
download | busybox-8ef9effaa558fbbf7e0f3b91a3faa4074686e671.tar.gz |
fdisk: placate warning of strncpy not copying NUL byte
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/fdisk_sgi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/fdisk_sgi.c b/util-linux/fdisk_sgi.c index 30def09c6..1cf0af5cc 100644 --- a/util-linux/fdisk_sgi.c +++ b/util-linux/fdisk_sgi.c @@ -425,7 +425,7 @@ create_sgiinfo(void) /* 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_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); |