Skip to content

Commit 94bf7c8

Browse files
keesrafaeljw
authored andcommitted
ACPICA: struct acpi_resource_vendor: Replace 1-element array with flexible array
ACPICA commit 446d05d5ea77946b8b3b8d0c638d1a446b18503e 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. Link: acpica/acpica@446d05d5 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent d0a874c commit 94bf7c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/acpi/acrestyp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ struct acpi_resource_fixed_dma {
194194

195195
struct acpi_resource_vendor {
196196
u16 byte_length;
197-
u8 byte_data[1];
197+
u8 byte_data[];
198198
};
199199

200200
/* Vendor resource with UUID info (introduced in ACPI 3.0) */
@@ -203,7 +203,7 @@ struct acpi_resource_vendor_typed {
203203
u16 byte_length;
204204
u8 uuid_subtype;
205205
u8 uuid[ACPI_UUID_LENGTH];
206-
u8 byte_data[1];
206+
u8 byte_data[];
207207
};
208208

209209
struct acpi_resource_end_tag {

0 commit comments

Comments
 (0)