summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorKees Cook <kees@outflux.net>2023-02-23 17:12:21 -0800
committerKees Cook <kees@outflux.net>2023-03-02 11:03:42 -0800
commit8c9bd5d151f77767b2fd937911848b7159dc8ee9 (patch)
tree4adb10ad513659927725b5253999af4680b2d9d0 /source
parent151a44c5da640537271a3400c9049511a6e1360f (diff)
downloadacpica-8c9bd5d151f77767b2fd937911848b7159dc8ee9.tar.gz
actbl1: Replace 1-element arrays with flexible arrays
Similar to commit 7ba2f3d91a32 ("Replace one-element array with flexible-array"), replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run-time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). No .text nor .data differences result from this change.
Diffstat (limited to 'source')
-rw-r--r--source/include/actbl1.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
index 2e400b526..63f137117 100644
--- a/source/include/actbl1.h
+++ b/source/include/actbl1.h
@@ -1272,7 +1272,7 @@ typedef struct acpi_table_drtm
typedef struct acpi_drtm_vtable_list
{
UINT32 ValidatedTableCount;
- UINT64 ValidatedTables[1];
+ UINT64 ValidatedTables[];
} ACPI_DRTM_VTABLE_LIST;
@@ -1291,7 +1291,7 @@ typedef struct acpi_drtm_resource
typedef struct acpi_drtm_resource_list
{
UINT32 ResourceCount;
- ACPI_DRTM_RESOURCE Resources[1];
+ ACPI_DRTM_RESOURCE Resources[];
} ACPI_DRTM_RESOURCE_LIST;
@@ -1319,7 +1319,7 @@ typedef struct acpi_table_ecdt
ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */
UINT32 Uid; /* Unique ID - must be same as the EC _UID method */
UINT8 Gpe; /* The GPE for the EC */
- UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */
+ UINT8 Id[]; /* Full namepath of the EC in the ACPI namespace */
} ACPI_TABLE_ECDT;