From: Thorsten Blum Date: Thu, 3 Jul 2025 17:19:34 +0000 (+0200) Subject: crypto: zstd - replace zero-length array with flexible array member X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25f4e1d7193d1438715bb0f05b6aa8df3f7b434f;p=thirdparty%2Flinux.git crypto: zstd - replace zero-length array with flexible array member Replace the deprecated zero-length array with a modern flexible array member in the struct zstd_ctx. No functional changes intended. Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Thorsten Blum Reviewed-by: Kees Cook Signed-off-by: Herbert Xu --- diff --git a/crypto/zstd.c b/crypto/zstd.c index 24edb4d616b56..ebeadc1f3b5fd 100644 --- a/crypto/zstd.c +++ b/crypto/zstd.c @@ -25,7 +25,7 @@ struct zstd_ctx { zstd_dctx *dctx; size_t wksp_size; zstd_parameters params; - u8 wksp[0] __aligned(8); + u8 wksp[] __aligned(8); }; static DEFINE_MUTEX(zstd_stream_lock);