summaryrefslogtreecommitdiff
path: root/extras/scsi_id
diff options
context:
space:
mode:
Diffstat (limited to 'extras/scsi_id')
-rw-r--r--extras/scsi_id/scsi_serial.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c
index 513d922559..e1726bbd70 100644
--- a/extras/scsi_id/scsi_serial.c
+++ b/extras/scsi_id/scsi_serial.c
@@ -732,6 +732,7 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd,
for (i = 4; i < len + 4; i++, ser_ind++)
serial[ser_ind] = buf[i];
memcpy(serial_short, &buf[4], len);
+ serial_short[len] = '\0';
return 0;
}