twister

HTTP fault injector for testing
Log | Files | Refs | README | LICENSE

commit 69fb5834f81930672d52f4dd8503086e25957822
parent 9dff7ccf04525216f89e0027f9e3a91424ed1566
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri,  9 May 2025 15:12:29 +0200

gnunet no longer likes 0-byte for prng

Diffstat:
Msrc/twister/taler-twister-service.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c @@ -1909,8 +1909,9 @@ create_response (void *cls, size_t fake_len; TWISTER_LOG_DEBUG ("Will (badly) truncate the response.\n"); - fake_len = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, - hr->io_len); + if (hr->io_len > 0) + fake_len = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, + hr->io_len); hr->io_len = fake_len; malform = GNUNET_NO; }