From 2a4e42f31507a46fb1bc4e0a6c64b7a2e0ce8694 Mon Sep 17 00:00:00 2001 From: lazymio Date: Sun, 6 Mar 2022 23:40:57 +0100 Subject: [PATCH] Fix test --- tests/unit/test_ctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_ctl.c b/tests/unit/test_ctl.c index b0ce7682..7e9ef9ba 100644 --- a/tests/unit/test_ctl.c +++ b/tests/unit/test_ctl.c @@ -144,10 +144,11 @@ double time_emulation(uc_engine *uc, uint64_t start, uint64_t end) static void test_uc_ctl_tb_cache() { uc_engine *uc; - char code[CODE_LEN]; + char code[CODE_LEN + 1]; double standard, cached, evicted; memset(code, 0x90, CODE_LEN); + code[CODE_LEN] = 0; uc_common_setup(&uc, UC_ARCH_X86, UC_MODE_32, code, sizeof(code) - 1);