Message ID | 1336555446-20180-22-git-send-email-jim@meyering.net |
---|---|
State | New |
Headers | show |
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;