From ca498343dd9932a9b6463eefda96c05b2c567391 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Thu, 16 Nov 2023 12:02:07 -0800 Subject: [PATCH] [linux] Backport fix for arry-index-out-of-bounds UBSAN warning Backport the fix already in the kernel, and is fixed in the dev branch in a different way. https://lkml.kernel.org/r/20231012213428.1390905-1-nickrterrell@gmail.com --- lib/common/fse_decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/fse_decompress.c b/lib/common/fse_decompress.c index 1e1c9f92d..d0781d5d7 100644 --- a/lib/common/fse_decompress.c +++ b/lib/common/fse_decompress.c @@ -237,7 +237,7 @@ FORCE_INLINE_TEMPLATE size_t FSE_decompress_usingDTable_generic( typedef struct { short ncount[FSE_MAX_SYMBOL_VALUE + 1]; - FSE_DTable dtable[1]; /* Dynamically sized */ + FSE_DTable dtable[]; /* Dynamically sized */ } FSE_DecompressWksp;