[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 21/22] scsi: mark an strncpy use as valid
From: |
Jim Meyering |
Subject: |
[Qemu-devel] [PATCH 21/22] scsi: mark an strncpy use as valid |
Date: |
Wed, 9 May 2012 11:24:05 +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 dbdb99c..916f425 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -402,6 +402,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.1.487.ga3935e6
- [Qemu-devel] [PATCH 03/22] vmdk: relative_path: avoid buffer overrun, (continued)
- [Qemu-devel] [PATCH 13/22] virtio-9p: avoid unwarranted use of strncpy, Jim Meyering, 2012/05/09
- [Qemu-devel] [PATCH 05/22] lm32: avoid buffer overrun, Jim Meyering, 2012/05/09
- [Qemu-devel] [PATCH 19/22] qcow2: mark this file's sole strncpy use as justified, Jim Meyering, 2012/05/09
- [Qemu-devel] [PATCH 21/22] scsi: mark an strncpy use as valid,
Jim Meyering <=
- Re: [Qemu-devel] strncpy: best avoided (resend), Kevin Wolf, 2012/05/10