diff --git a/suite/cstest/src/arm64_detail.c b/suite/cstest/src/arm64_detail.c index 5f90441f..1617a7a8 100644 --- a/suite/cstest/src/arm64_detail.c +++ b/suite/cstest/src/arm64_detail.c @@ -87,8 +87,7 @@ char *get_detail_arm64(csh *handle, cs_mode mode, cs_insn *ins) break; } - if (op->shift.type != ARM64_SFT_INVALID && - op->shift.value) + if (op->shift.type != ARM64_SFT_INVALID && op->shift.value) add_str(&result, " ; Shift: type = %u, value = %u", op->shift.type, op->shift.value); if (op->ext != ARM64_EXT_INVALID) @@ -132,4 +131,3 @@ char *get_detail_arm64(csh *handle, cs_mode mode, cs_insn *ins) return result; } - diff --git a/suite/cstest/src/arm_detail.c b/suite/cstest/src/arm_detail.c index 26f4b087..a2b48ff9 100644 --- a/suite/cstest/src/arm_detail.c +++ b/suite/cstest/src/arm_detail.c @@ -147,4 +147,3 @@ char *get_detail_arm(csh *handle, cs_mode mode, cs_insn *ins) return result; } - diff --git a/suite/cstest/src/capstone_test.c b/suite/cstest/src/capstone_test.c index e823e237..33bf1693 100644 --- a/suite/cstest/src/capstone_test.c +++ b/suite/cstest/src/capstone_test.c @@ -84,7 +84,7 @@ double_dict options[] = { char *(*function)(csh *, cs_mode, cs_insn*) = NULL; -int triple_compare(const char *src1, const char *src2, const char *des) +static int triple_compare(const char *src1, const char *src2, const char *des) { if (strcmp(src1, des) && strcmp(src2, des)) { fprintf(stderr,"[ ERROR ] --- \"%s\" != \"%s\"", src1, des); @@ -248,6 +248,7 @@ void test_single_issue(csh *handle, cs_mode mode, char *line, int detail) cs_result[0] = '\0'; list_part = split(line, " == ", &size_part); + offset_opcode = split(list_part[0], ": ", &size_offset_opcode); if (size_offset_opcode > 1) { offset = (unsigned int)strtol(offset_opcode[0], NULL, 16); @@ -256,6 +257,7 @@ void test_single_issue(csh *handle, cs_mode mode, char *line, int detail) offset = 0; list_byte = split(offset_opcode[0], ",", &size_byte); } + code = (unsigned char *)malloc(sizeof(char) * size_byte); for (i=0; i