Skip to content

Commit e37937f

Browse files
authored
ztest: fix broken random call
Bad copypasta in 4d451ba, 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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Sean Eric Fagan <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #17957
1 parent 1f3444f commit e37937f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/ztest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8143,7 +8143,7 @@ ztest_raidz_expand_run(ztest_shared_t *zs, spa_t *spa)
81438143
/* Setup a 1 MiB buffer of random data */
81448144
uint64_t bufsize = 1024 * 1024;
81458145
void *buffer = umem_alloc(bufsize, UMEM_NOFAIL);
8146-
random_get_pseudo_bytes((uint8_t *)&buffer, bufsize);
8146+
random_get_pseudo_bytes((uint8_t *)buffer, bufsize);
81478147

81488148
/*
81498149
* Put some data in the pool and then attach a vdev to initiate

0 commit comments

Comments
 (0)