8 #define MAX_INSTR_SIZE 64
9 #define MAX_LINE_SIZE 128
25 for (
i = 1;
i < argc;
i++) {
27 fp = fopen(
argv[
i],
"rb");
40 if (strcmp(
arch,
"CS_ARCH_X86") == 0 && strcmp(
mode,
"CS_MODE_32") == 0) {
42 }
else if (strcmp(
arch,
"CS_ARCH_X86") == 0 && strcmp(
mode,
"CS_MODE_64") == 0) {
44 }
else if (strcmp(
arch,
"CS_ARCH_ARM") == 0 && strcmp(
mode,
"CS_MODE_ARM") == 0) {
46 }
else if (strcmp(
arch,
"CS_ARCH_ARM") == 0 && strcmp(
mode,
"CS_MODE_THUMB") == 0) {
48 }
else if (strcmp(
arch,
"CS_ARCH_ARM") == 0 && strcmp(
mode,
"CS_MODE_ARM+CS_MODE_V8") == 0) {
50 }
else if (strcmp(
arch,
"CS_ARCH_ARM") == 0 && strcmp(
mode,
"CS_MODE_THUMB+CS_MODE_V8") == 0) {
52 }
else if (strcmp(
arch,
"CS_ARCH_ARM") == 0 && strcmp(
mode,
"CS_MODE_THUMB+CS_MODE_MCLASS") == 0) {
54 }
else if (strcmp(
arch,
"CS_ARCH_ARM64") == 0 && strcmp(
mode,
"0") == 0) {
56 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32+CS_MODE_BIG_ENDIAN") == 0) {
58 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32+CS_MODE_MICRO") == 0) {
60 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS64") == 0) {
62 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32") == 0) {
64 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS64+CS_MODE_BIG_ENDIAN") == 0) {
66 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32+CS_MODE_MICRO+CS_MODE_BIG_ENDIAN") == 0) {
68 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32+CS_MODE_BIG_ENDIAN+CS_MODE_MICRO") == 0) {
70 }
else if (strcmp(
arch,
"CS_ARCH_PPC") == 0 && strcmp(
mode,
"CS_MODE_BIG_ENDIAN") == 0) {
72 }
else if (strcmp(
arch,
"CS_ARCH_SPARC") == 0 && strcmp(
mode,
"CS_MODE_BIG_ENDIAN") == 0) {
74 }
else if (strcmp(
arch,
"CS_ARCH_SPARC") == 0 && strcmp(
mode,
"CS_MODE_BIG_ENDIAN + CS_MODE_V9") == 0) {
76 }
else if (strcmp(
arch,
"CS_ARCH_SYSZ") == 0 && strcmp(
mode,
"0") == 0) {
78 }
else if (strcmp(
arch,
"CS_ARCH_XCORE") == 0 && strcmp(
mode,
"0") == 0) {
80 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32R6+CS_MODE_BIG_ENDIAN") == 0) {
82 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32R6+CS_MODE_MICRO+CS_MODE_BIG_ENDIAN") == 0) {
84 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32R6") == 0) {
86 }
else if (strcmp(
arch,
"CS_ARCH_MIPS") == 0 && strcmp(
mode,
"CS_MODE_MIPS32R6+CS_MODE_MICRO") == 0) {
88 }
else if (strcmp(
arch,
"CS_ARCH_M68K") == 0 && strcmp(
mode,
"0") == 0) {
90 }
else if (strcmp(
arch,
"CS_ARCH_M680X") == 0 && strcmp(
mode,
"CS_MODE_M680X_6809") == 0) {
92 }
else if (strcmp(
arch,
"CS_ARCH_EVM") == 0 && strcmp(
mode,
"0") == 0) {
112 while (sscanf(
line+(Size-1)*5,
"0x%02x", &
value) == 1) {
115 if (
line[(Size-1)*5-1] !=
',') {
119 printf(
"Line overflow\n");
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
int main(int argc, char **argv)
static static fork const void static count static fd const char const char static newpath char char argv