]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[linux] Backport fix for arry-index-out-of-bounds UBSAN warning
authorNick Terrell <terrelln@meta.com>
Thu, 16 Nov 2023 20:02:07 +0000 (12:02 -0800)
committerNick Terrell <terrelln@meta.com>
Thu, 16 Nov 2023 20:02:07 +0000 (12:02 -0800)
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

index 1e1c9f92d6b817cbeee05aa1f5ca0902ad76c0b8..d0781d5d7d89c7162f56d63921f67e55f2f7000f 100644 (file)
@@ -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;