From 151a44c5da640537271a3400c9049511a6e1360f Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 23 Feb 2023 17:12:21 -0800 Subject: ACPI_EFI_FILE_INFO: 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. --- source/include/platform/acefiex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/platform/acefiex.h b/source/include/platform/acefiex.h index dce3518be..8df422b44 100644 --- a/source/include/platform/acefiex.h +++ b/source/include/platform/acefiex.h @@ -508,7 +508,7 @@ typedef struct { ACPI_EFI_TIME LastAccessTime; ACPI_EFI_TIME ModificationTime; UINT64 Attribute; - CHAR16 FileName[1]; + CHAR16 FileName[]; } ACPI_EFI_FILE_INFO; #define SIZE_OF_ACPI_EFI_FILE_INFO ACPI_OFFSET(ACPI_EFI_FILE_INFO, FileName) -- cgit v1.2.1