From: Arne Welzel Date: Mon, 10 Sep 2012 09:32:38 +0000 (+0200) Subject: blocktest: fix segfault on vectored read X-Git-Tag: v3.2.1~343 X-Git-Url: http://zhaoyanbai.com/repos/COPYRIGHT?a=commitdiff_plain;h=4fbdf1946d6200e8c4f7b3f54e301cc2047d4f97;p=minix.git blocktest: fix segfault on vectored read --- 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. */