aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r--hw/scsi-disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 4c4b921d91..744573e0d2 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -821,7 +821,7 @@ SCSIDevice *scsi_disk_init(BlockDriverState *bdrv, int tcq,
strncpy(s->drive_serial_str, drive_get_serial(s->bdrv),
sizeof(s->drive_serial_str));
if (strlen(s->drive_serial_str) == 0)
- strcpy(s->drive_serial_str, "0");
+ pstrcpy(s->drive_serial_str, sizeof(s->drive_serial_str), "0");
d = (SCSIDevice *)qemu_mallocz(sizeof(SCSIDevice));
d->state = s;
d->destroy = scsi_destroy;