From 3c23eebe51cf90d116057bb3947d19572df81027 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 23 Aug 2022 12:16:55 +0300 Subject: [PATCH] ci: fix -fsanitize=address for c_array_test.c --- vlib/v/tests/c_array_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/tests/c_array_test.c b/vlib/v/tests/c_array_test.c index 6f9bdaa32a..8617a92867 100644 --- a/vlib/v/tests/c_array_test.c +++ b/vlib/v/tests/c_array_test.c @@ -7,9 +7,9 @@ void* gen_c_array(int size) { } void* gen_c_int_array(int size) { - int *c_array = malloc(size); + int *c_array = malloc(size * sizeof(int)); for(int i = 0; i < size; i++) { - c_array[i] = i & 0xFF; + c_array[i] = i; } return c_array; }