[SCSI] ipr: fix buffer overflow
authorBrian King <brking@linux.vnet.ibm.com>
Thu, 30 Jul 2009 15:58:51 +0000 (10:58 -0500)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 22 Aug 2009 22:52:12 +0000 (17:52 -0500)
ipr_cmd_label[] isn't big enough for an eight byte string plus terminator.
Fix by shortening the string to seven bytes.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/ipr.h

index 4b63dd6b1c813f1ddfa525382b4b37f4ca2aabf5..163245a1c3e5a666b0d97cabbf5813eccb4a6dcb 100644 (file)
@@ -1199,7 +1199,7 @@ struct ipr_ioa_cfg {
 
        struct ata_host ata_host;
        char ipr_cmd_label[8];
-#define IPR_CMD_LABEL          "ipr_cmnd"
+#define IPR_CMD_LABEL          "ipr_cmd"
        struct ipr_cmnd *ipr_cmnd_list[IPR_NUM_CMD_BLKS];
        u32 ipr_cmnd_list_dma[IPR_NUM_CMD_BLKS];
 };