瀏覽代碼

[SCSI] ipr: fix buffer overflow

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>
Brian King 16 年之前
父節點
當前提交
0124ca9d8e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/scsi/ipr.h

+ 1 - 1
drivers/scsi/ipr.h

@@ -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];
 };