aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/crypto_aes256.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-11-15 16:51:48 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-11-15 16:52:00 +0100
commit36d184d0c876b0d296787a82de742a18d1c13015 (patch)
tree4d61d54e65ab9e9853f543894bc4f927a3f67151 /src/test/fuzz/crypto_aes256.cpp
parentc82284cfdccdac2959cea105c18c423e603a26bc (diff)
parent214d9055acdd72189a2f415477ce472ca8db4191 (diff)
Merge bitcoin/bitcoin#22508: fuzz: replace every fuzzer-controlled while loop with a macro
214d9055acdd72189a2f415477ce472ca8db4191 fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop (Andrew Poelstra) Pull request description: Limits the number of iterations to 1000 rather than letting the fuzzer do millions or billions of iterations on a single core. ACKs for top commit: MarcoFalke: cr ACK 214d9055acdd72189a2f415477ce472ca8db4191 Tree-SHA512: 9741c32ccd126ea656e5c93371b7136eaa2f92dc9a490dd4d39642503b1a41174f3368245153e508c3b608fe37ab89800b67ada97b740e3b5a3728bb506429d3
Diffstat (limited to 'src/test/fuzz/crypto_aes256.cpp')
-rw-r--r--src/test/fuzz/crypto_aes256.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/crypto_aes256.cpp b/src/test/fuzz/crypto_aes256.cpp
index ccabd1f7dc..0937026fdd 100644
--- a/src/test/fuzz/crypto_aes256.cpp
+++ b/src/test/fuzz/crypto_aes256.cpp
@@ -19,7 +19,7 @@ FUZZ_TARGET(crypto_aes256)
AES256Encrypt encrypt{key.data()};
AES256Decrypt decrypt{key.data()};
- while (fuzzed_data_provider.ConsumeBool()) {
+ LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000) {
const std::vector<uint8_t> plaintext = ConsumeFixedLengthByteVector(fuzzed_data_provider, AES_BLOCKSIZE);
std::vector<uint8_t> ciphertext(AES_BLOCKSIZE);
encrypt.Encrypt(ciphertext.data(), plaintext.data());