diff options
Diffstat (limited to 'src/test/test_oom.c')
-rw-r--r-- | src/test/test_oom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_oom.c b/src/test/test_oom.c index cc6e532358..989ca1203b 100644 --- a/src/test/test_oom.c +++ b/src/test/test_oom.c @@ -82,8 +82,8 @@ add_bytes_to_buf(generic_buffer_t *buf, size_t n_bytes) char b[3000]; while (n_bytes) { - size_t this_add = n_bytes > sizeof(buf) ? sizeof(buf) : n_bytes; - crypto_rand(b, sizeof(b)); + size_t this_add = n_bytes > sizeof(b) ? sizeof(b) : n_bytes; + crypto_rand(b, this_add); generic_buffer_add(buf, b, this_add); n_bytes -= this_add; } |