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
commit9879d9995482be4c76d56d41d4074dd3146c690f (patch)
treed0316184868fcea26a580f312b2cedfc7dca769a /source
parente7f6d8c1b7f79eb4b9b07f1bc09c549a2acbd6e8 (diff)
downloadacpica-9879d9995482be4c76d56d41d4074dd3146c690f.tar.gz
ASL_CACHE_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). One binary difference appears in aslcache.o, which appears to be the compiler choosing different working registers. No other changes are seen in the .text nor .data sections.
Diffstat (limited to 'source')
-rw-r--r--source/compiler/asltypes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/compiler/asltypes.h b/source/compiler/asltypes.h
index 30cd7b789..577d3b881 100644
--- a/source/compiler/asltypes.h
+++ b/source/compiler/asltypes.h
@@ -336,7 +336,7 @@ typedef struct asl_file_desc
typedef struct asl_cache_info
{
void *Next;
- char Buffer[1];
+ char Buffer[];
} ASL_CACHE_INFO;