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:02:28 -0800
commit446d05d5ea77946b8b3b8d0c638d1a446b18503e (patch)
tree6889aef814e1ab15d1c6001dff8d7af6abcdbdbd /source
parent682350c40c13504e3e880ebfd7d08b9f803d72dd (diff)
downloadacpica-446d05d5ea77946b8b3b8d0c638d1a446b18503e.tar.gz
ACPI_RESOURCE_VENDOR: Replace 1-element array with flexible array
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 binary changes appear in the .text nor .data sections.
Diffstat (limited to 'source')
-rw-r--r--source/include/acrestyp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/include/acrestyp.h b/source/include/acrestyp.h
index 10e8ff89f..16356098f 100644
--- a/source/include/acrestyp.h
+++ b/source/include/acrestyp.h
@@ -357,7 +357,7 @@ typedef struct acpi_resource_fixed_dma
typedef struct acpi_resource_vendor
{
UINT16 ByteLength;
- UINT8 ByteData[1];
+ UINT8 ByteData[];
} ACPI_RESOURCE_VENDOR;
@@ -368,7 +368,7 @@ typedef struct acpi_resource_vendor_typed
UINT16 ByteLength;
UINT8 UuidSubtype;
UINT8 Uuid[ACPI_UUID_LENGTH];
- UINT8 ByteData[1];
+ UINT8 ByteData[];
} ACPI_RESOURCE_VENDOR_TYPED;