From 4fbdf1946d6200e8c4f7b3f54e301cc2047d4f97 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Mon, 10 Sep 2012 11:32:38 +0200 Subject: [PATCH] blocktest: fix segfault on vectored read --- test/blocktest/blocktest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/blocktest/blocktest.c b/test/blocktest/blocktest.c index 525061782..564c13f0c 100644 --- a/test/blocktest/blocktest.c +++ b/test/blocktest/blocktest.c @@ -857,7 +857,7 @@ static void vector_and_large_sub(size_t small_size) * has dword-sized guards before each chunk and after the last chunk. * SPTR(n) points to the start of the nth small chunk. */ -#define SPTR(n) (buf2_ptr + (n) * (sizeof(u32_t) + small_size)) +#define SPTR(n) (buf2_ptr + sizeof(u32_t) + (n) * (sizeof(u32_t) + small_size)) #define LPTR(n) (buf_ptr + sizeof(u32_t) + small_size * (n)) /* Write one large chunk, if writing is allowed. */ -- 2.44.0