summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorJim Meyering2012-10-04 13:10:02 +0200
committerAnthony Liguori2012-10-05 14:58:38 +0200
commit9310b9be14f73d4c1e98bfa315fe84326ad9e8e7 (patch)
tree7a2f88ae2b3d02192f4daf965dd2ba6986888c87 /hw
parentqcow2: mark this file's sole strncpy use as justified (diff)
downloadqemu-9310b9be14f73d4c1e98bfa315fe84326ad9e8e7.tar.gz
qemu-9310b9be14f73d4c1e98bfa315fe84326ad9e8e7.tar.xz
qemu-9310b9be14f73d4c1e98bfa315fe84326ad9e8e7.zip
hw/r2d: add comment: this strncpy use is ok
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/r2d.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/r2d.c b/hw/r2d.c
index 0f16e81afe..1bc191ff3e 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -332,6 +332,8 @@ static void r2d_init(ram_addr_t ram_size,
}
if (kernel_cmdline) {
+ /* I see no evidence that this .kernel_cmdline buffer requires
+ NUL-termination, so using strncpy should be ok. */
strncpy(boot_params.kernel_cmdline, kernel_cmdline,
sizeof(boot_params.kernel_cmdline));
}