aboutsummaryrefslogtreecommitdiff
path: root/hw/r2d.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-10-04 13:10:02 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2012-10-05 07:58:38 -0500
commit9310b9be14f73d4c1e98bfa315fe84326ad9e8e7 (patch)
tree7a2f88ae2b3d02192f4daf965dd2ba6986888c87 /hw/r2d.c
parent00ea188125f6ee33e6beaff5da878fa9478e6a0d (diff)
downloadqemu-9310b9be14f73d4c1e98bfa315fe84326ad9e8e7.zip
qemu-9310b9be14f73d4c1e98bfa315fe84326ad9e8e7.tar.gz
qemu-9310b9be14f73d4c1e98bfa315fe84326ad9e8e7.tar.bz2
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/r2d.c')
-rw-r--r--hw/r2d.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/r2d.c b/hw/r2d.c
index 0f16e81..1bc191f 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));
}