From 3dbb9c8448a23ad1405d415922b3b6e4e9bfe78b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 10 Mar 2021 16:23:11 +0100 Subject: [PATCH] Kernel: Turn a VLA into a statically-sized array in dump_backtrace() --- Kernel/KSyms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/KSyms.cpp b/Kernel/KSyms.cpp index 8bdd475dc07..0dcd504844f 100644 --- a/Kernel/KSyms.cpp +++ b/Kernel/KSyms.cpp @@ -127,7 +127,7 @@ NEVER_INLINE static void dump_backtrace_impl(FlatPtr base_pointer, bool use_ksym FlatPtr address; const KernelSymbol* symbol { nullptr }; }; - size_t max_recognized_symbol_count = 256; + constexpr size_t max_recognized_symbol_count = 256; RecognizedSymbol recognized_symbols[max_recognized_symbol_count]; size_t recognized_symbol_count = 0; if (use_ksyms) {