diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /capstone/suite/fuzz/fuzz_decode_platform.c | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'capstone/suite/fuzz/fuzz_decode_platform.c')
-rw-r--r-- | capstone/suite/fuzz/fuzz_decode_platform.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/capstone/suite/fuzz/fuzz_decode_platform.c b/capstone/suite/fuzz/fuzz_decode_platform.c new file mode 100644 index 000000000..d79c4ea34 --- /dev/null +++ b/capstone/suite/fuzz/fuzz_decode_platform.c @@ -0,0 +1,27 @@ +// this tool decodes first input byte feed to OSS fuzz, that encodes arch+mode +// by Nguyen Anh Quynh, 2019 + +#include <stdio.h> +#include <inttypes.h> + +#include <capstone/capstone.h> + +#include "platform.h" + +int main(int argc, char **argv) +{ + unsigned char data; + + if (argc != 2) { + printf("Decoding OSS fuzz platform\n"); + printf("Syntax: %s <hex-byte>\n", argv[0]); + return -1; + } + + data = (unsigned int)strtol(argv[1], NULL, 16); + + printf("cstool arch+mode = %s\n", get_platform_cstoolname(data)); + + return 0; +} + |