lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 Aug 2022 16:42:21 -0500
From:   "Gustavo A. R. Silva" <>
Cc:     Kashyap Desai <>,
        Sumit Saxena <>,
        Shivasharan S <>,
        "James E.J. Bottomley" <>,
        "Martin K. Petersen" <>,
        Kees Cook <>,
        "Gustavo A. R. Silva" <>,
Subject: [PATCH v3 2/6] scsi: megaraid_sas: Replace one-element array with
 flexible-array member in MR_FW_RAID_MAP_DYNAMIC

One-element arrays are deprecated, and we are replacing them with
flexible array members, instead. So, replace one-element array with
flexible-array member in struct MR_FW_RAID_MAP_DYNAMIC.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy().

Signed-off-by: Gustavo A. R. Silva <>
Changes in v3:
 - None.

Changes in v2:
 - None.

 drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.h b/drivers/scsi/megaraid/megaraid_sas_fusion.h
index 5530c233fccb..66e13b74fcdc 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
@@ -1053,7 +1053,7 @@ struct MR_FW_RAID_MAP_DYNAMIC {
 	/* Variable Size buffer containing all data */
-	u32 raid_map_desc_data[1];
+	u32 raid_map_desc_data[];
 }; /* Dynamicaly sized RAID MAp structure */
 #define IEEE_SGE_FLAGS_ADDR_MASK            (0x03)

Powered by blists - more mailing lists