[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv2 21/22] scsi: mark an strncpy use as valid
From: |
Jim Meyering |
Subject: |
[Qemu-devel] [PATCHv2 21/22] scsi: mark an strncpy use as valid |
Date: |
Wed, 30 May 2012 09:46:40 +0200 |
From: Jim Meyering <address@hidden>
Signed-off-by: Jim Meyering <address@hidden>
---
hw/scsi-bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 3edda28..98170c3 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -406,6 +406,7 @@ static bool scsi_target_emulate_inquiry(SCSITargetReq *r)
r->buf[7] = 0x10 | (r->req.bus->info->tcq ? 0x02 : 0); /* Sync, TCQ.
*/
memcpy(&r->buf[8], "QEMU ", 8);
memcpy(&r->buf[16], "QEMU TARGET ", 16);
+ /* This use of strncpy is ok. */
strncpy((char *) &r->buf[32], QEMU_VERSION, 4);
}
return true;
--
1.7.10.2.605.gbefc5ed
- [Qemu-devel] [PATCHv2 10/22] linux-user: remove two unchecked uses of strdup, (continued)
- [Qemu-devel] [PATCHv2 10/22] linux-user: remove two unchecked uses of strdup, Jim Meyering, 2012/05/30
- [Qemu-devel] [PATCHv2 16/22] qemu-ga: prefer pstrcpy: consistently NUL-terminate ifreq.ifr_name, Jim Meyering, 2012/05/30
- [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 <=
- [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, 2012/05/30
- [Qemu-devel] [PATCHv2 15/22] target-i386: use pstrcpy, not strncpy, Jim Meyering, 2012/05/30