diff options
author | Karel Zak | 2017-05-17 12:29:50 +0200 |
---|---|---|
committer | Karel Zak | 2017-05-17 12:29:50 +0200 |
commit | 274e6f6f8f46bc99219cd6c439094e92933aeba7 (patch) | |
tree | 7f04051e98a56269bf43f9a785062a1e9896cad4 /libfdisk/src | |
parent | libfdisk: initialize partno variable [coverity scan] (diff) | |
download | kernel-qcow2-util-linux-274e6f6f8f46bc99219cd6c439094e92933aeba7.tar.gz kernel-qcow2-util-linux-274e6f6f8f46bc99219cd6c439094e92933aeba7.tar.xz kernel-qcow2-util-linux-274e6f6f8f46bc99219cd6c439094e92933aeba7.zip |
libfdisk: use memcpy() for non-terminated string [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src')
-rw-r--r-- | libfdisk/src/sgi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c index eca112a24..b17bb4245 100644 --- a/libfdisk/src/sgi.c +++ b/libfdisk/src/sgi.c @@ -153,7 +153,7 @@ int fdisk_sgi_create_info(struct fdisk_context *cxt) /* I keep SGI's habit to write the sgilabel to the second block */ sgilabel->volume[0].block_num = cpu_to_be32(2); sgilabel->volume[0].num_bytes = cpu_to_be32(sizeof(struct sgi_info)); - strncpy((char *) sgilabel->volume[0].name, "sgilabel", 8); + memcpy((char *) sgilabel->volume[0].name, "sgilabel", 8); fdisk_info(cxt, _("SGI info created on second sector.")); return 0; |