From 5284454d5f4e7ebe6c7095cf78318020ca9991bf Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Mon, 27 Nov 2006 17:13:19 +0100 Subject: scsi_id: remove trailing garbage from ID_SERIAL_SHORT --- extras/scsi_id/scsi_serial.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3-54-g00ecf