From e37937f42d8ed496b069dddd24399d187266cfe7 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Tue, 25 Nov 2025 04:43:15 +1100 Subject: [PATCH] ztest: fix broken random call Bad copypasta in 4d451bae8a, leading to random stuff being blasted all over stack, destroying the program. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin Reviewed-by: Brian Behlendorf Reviewed-by: Igor Kozhukhov Reviewed-by: Sean Eric Fagan Signed-off-by: Rob Norris Closes #17957 --- cmd/ztest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ztest.c b/cmd/ztest.c index dc8ac85b6..35929cbcf 100644 --- a/cmd/ztest.c +++ b/cmd/ztest.c @@ -8143,7 +8143,7 @@ ztest_raidz_expand_run(ztest_shared_t *zs, spa_t *spa) /* Setup a 1 MiB buffer of random data */ uint64_t bufsize = 1024 * 1024; void *buffer = umem_alloc(bufsize, UMEM_NOFAIL); - random_get_pseudo_bytes((uint8_t *)&buffer, bufsize); + random_get_pseudo_bytes((uint8_t *)buffer, bufsize); /* * Put some data in the pool and then attach a vdev to initiate