From: Nick Terrell Date: Thu, 16 Nov 2023 20:02:07 +0000 (-0800) Subject: [linux] Backport fix for arry-index-out-of-bounds UBSAN warning X-Git-Tag: v1.5.5-kernel~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca498343dd9932a9b6463eefda96c05b2c567391;p=thirdparty%2Fzstd.git [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 --- 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;