qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCHv3 19/20] hw/r2d: add comment: this strncpy use is ok


From: Jim Meyering
Subject: [Qemu-devel] [PATCHv3 19/20] hw/r2d: add comment: this strncpy use is ok
Date: Thu, 4 Oct 2012 13:10:02 +0200

From: Jim Meyering <address@hidden>


Signed-off-by: Jim Meyering <address@hidden>
---
 hw/r2d.c | 2 ++
 1 file changed, 2 insertions(+)

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));
     }
-- 
1.8.0.rc0.18.gf84667d




reply via email to

[Prev in Thread] Current Thread [Next in Thread]