From 8a8443112b4ab0bc8897daa9470fc84591538b05 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 17 Nov 2022 20:48:16 -0800 Subject: ACPI_RESOURCE_EXTENDED_IRQ: 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). --- source/include/acrestyp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/acrestyp.h b/source/include/acrestyp.h index f045c2000..1df062426 100644 --- a/source/include/acrestyp.h +++ b/source/include/acrestyp.h @@ -538,7 +538,7 @@ typedef struct acpi_resource_extended_irq UINT8 WakeCapable; UINT8 InterruptCount; ACPI_RESOURCE_SOURCE ResourceSource; - UINT32 Interrupts[1]; + UINT32 Interrupts[]; } ACPI_RESOURCE_EXTENDED_IRQ; -- cgit v1.2.1