Skip to content

Commit 5fb2b5a

Browse files
committed
fix bug in recently-added sntrup761 fuzzer
key values need to be static to persist across invocations; spotted by the Qualys Security Advisory team.
1 parent 0ca128c commit 5fb2b5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

regress/misc/fuzz-harness/sntrup761_dec_fuzz.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ void privkeys(unsigned char *zero_sk, unsigned char *rnd_sk)
5050
int LLVMFuzzerTestOneInput(const uint8_t* input, size_t len)
5151
{
5252
static bool once;
53-
unsigned char zero_sk[crypto_kem_sntrup761_SECRETKEYBYTES];
54-
unsigned char rnd_sk[crypto_kem_sntrup761_SECRETKEYBYTES];
53+
static unsigned char zero_sk[crypto_kem_sntrup761_SECRETKEYBYTES];
54+
static unsigned char rnd_sk[crypto_kem_sntrup761_SECRETKEYBYTES];
5555
unsigned char ciphertext[crypto_kem_sntrup761_CIPHERTEXTBYTES];
5656
unsigned char secret[crypto_kem_sntrup761_BYTES];
5757

0 commit comments

Comments
 (0)