Skip to content

Commit df13f89

Browse files
committed
fix issues reported by Clang Static Analyzer (third attempt)
1 parent 765fe13 commit df13f89

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pqc/mlkem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static void s_mlkem_poly_reduce(mlkem_poly *r)
480480
static void s_mlkem_poly_getnoise(mlkem_poly *r, const unsigned char seed[MLKEM_SYMBYTES],
481481
unsigned char nonce, int eta)
482482
{
483-
unsigned char buf[3 * MLKEM_N / 4]; /* max for eta=3 */
483+
unsigned char buf[3 * MLKEM_N / 4] = {0}; /* max for eta=3 */
484484
unsigned long buflen = (unsigned long)eta * MLKEM_N / 4;
485485
s_mlkem_prf(buf, buflen, seed, nonce);
486486
s_mlkem_poly_cbd_eta(r, buf, eta);

0 commit comments

Comments
 (0)