diff options
| author | Douglas Gilbert <dougg@torque.net> | 2003-01-29 22:59:18 -0500 |
|---|---|---|
| committer | James Bottomley <jejb@raven.il.steeleye.com> | 2003-01-29 22:59:18 -0500 |
| commit | b0cf4f6d2456fda1c439e33adffa2d8e2e16b6b5 (patch) | |
| tree | a15353bd103efb11e5d6f4a9cadbe409142f48e2 | |
| parent | b06ab129deeaaccb3604d85943799a2c7b3c72eb (diff) | |
[SCSI] Add length checking to sprintf in sg
| -rw-r--r-- | drivers/scsi/sg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 63f9083f08b7..5a7e5a1952e1 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -19,7 +19,7 @@ */ #include <linux/config.h> #ifdef CONFIG_PROC_FS -static char *sg_version_str = "Version: 3.5.27 (20020812)"; +static char *sg_version_str = "Version: 3.5.27 (20030130)"; #endif static int sg_version_num = 30527; /* 2 digits for each component */ /* @@ -1455,9 +1455,9 @@ find_empty_slot: sdp->sg_tablesize = scsidp->host ? scsidp->host->sg_tablesize : 0; memset(&sdp->sg_driverfs_dev, 0, sizeof (struct device)); - sprintf(sdp->sg_driverfs_dev.bus_id, "%s:gen", + snprintf(sdp->sg_driverfs_dev.bus_id, BUS_ID_SIZE, "%s:gen", scsidp->sdev_driverfs_dev.bus_id); - sprintf(sdp->sg_driverfs_dev.name, "%sgeneric", + snprintf(sdp->sg_driverfs_dev.name, DEVICE_NAME_SIZE, "%sgeneric", scsidp->sdev_driverfs_dev.name); sdp->sg_driverfs_dev.parent = &scsidp->sdev_driverfs_dev; sdp->sg_driverfs_dev.bus = scsidp->sdev_driverfs_dev.bus; |
