summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco d'Itri <md@Linux.IT>2006-11-27 17:13:19 +0100
committerKay Sievers <kay.sievers@vrfy.org>2006-11-27 17:13:19 +0100
commit5284454d5f4e7ebe6c7095cf78318020ca9991bf (patch)
tree5653d47b0645cb7577548c130ab9a040bee388c9
parent64e6d9dd705f418307fb474a5185d31470f21989 (diff)
scsi_id: remove trailing garbage from ID_SERIAL_SHORT
-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;
}