]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/r2d: add comment: this strncpy use is ok
authorJim Meyering <meyering@redhat.com>
Thu, 4 Oct 2012 11:10:02 +0000 (13:10 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Oct 2012 12:58:38 +0000 (07:58 -0500)
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/r2d.c

index 0f16e81afe1060d9f544cbf0af413b06099ab040..1bc191ff3e5c035c6b90d20c9a066b2c4f3d79d0 100644 (file)
--- 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));
     }