[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv2 20/22] hw/r2d: add comment: this strncpy use is ok
From: |
Jim Meyering |
Subject: |
[Qemu-devel] [PATCHv2 20/22] hw/r2d: add comment: this strncpy use is ok |
Date: |
Wed, 30 May 2012 09:46:39 +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 c55de01..ed841c5 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -328,6 +328,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.7.10.2.605.gbefc5ed
- [Qemu-devel] [PATCHv2 12/22] bt: replace fragile snprintf use and unwarranted strncpy, (continued)
- [Qemu-devel] [PATCHv2 12/22] bt: replace fragile snprintf use and unwarranted strncpy, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 13/22] virtio-9p: avoid unwarranted uses of strncpy, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 09/22] ppc: avoid buffer overrun: use pstrcpy, not strncpy, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 11/22] ui/vnc: simplify and avoid strncpy, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 19/22] qcow2: mark this file's sole strncpy use as justified, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 14/22] vscsi: avoid unwarranted strncpy, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 17/22] libcacard/vcard_emul_nss: use pstrcpy in place of strncpy, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 22/22] doc: update HACKING wrt strncpy/pstrcpy, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 21/22] scsi: mark an strncpy use as valid, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 18/22] acpi: remove strzcpy (strncpy-identical) function; just use strncpy, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 20/22] hw/r2d: add comment: this strncpy use is ok,
Jim Meyering <=
- [Qemu-devel] [PATCHv2 15/22] target-i386: use pstrcpy, not strncpy, Jim Meyering, 2012/05/30