summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-copy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-copy.c b/src/test/test-copy.c
index 71836a307e..a669df644b 100644
--- a/src/test/test-copy.c
+++ b/src/test/test-copy.c
@@ -343,7 +343,8 @@ TEST_RET(copy_holes) {
assert_se(fstat(fd, &stat) >= 0);
blksz = stat.st_blksize;
- buf = alloca0(blksz);
+ buf = alloca_safe(blksz);
+ memset(buf, 1, blksz);
/* We need to make sure to create hole in multiples of the block size, otherwise filesystems (btrfs)
* might silently truncate/extend the holes. */