]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ml: Fix compilation with some compilers
authorTobias Brunner <tobias@strongswan.org>
Fri, 22 Nov 2024 13:42:34 +0000 (14:42 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 22 Nov 2024 13:43:57 +0000 (14:43 +0100)
Some (older) compilers complain that "variable-sized object may not be
initialized".

src/libstrongswan/plugins/ml/ml_kem.c

index 22cf305189ebbbde328653c5e992e9fbdfd0b905..409b5808426c538614f3a5e339d66ad77cf35378 100644 (file)
@@ -200,7 +200,7 @@ static void sample_poly_cbd(private_key_exchange_t *this, uint8_t eta,
        const int len = 64 * eta;
 
        chunk_t seed = chunk_alloca(ML_KEM_SEED_LEN+1);
-       uint8_t sample_seed[len] = {};
+       uint8_t sample_seed[len];
        uint32_t t, b;
        uint16_t x, y;
        int i, j;