aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-04-02 14:39:56 +0200
committervanhauser-thc <vh@thc.org>2021-04-02 14:39:56 +0200
commit3ff4ca348c344bded53f53b0d0c4b020a188f26e (patch)
tree45e66c5adb1af95d9d208abfe2286401c201a1d1
parente20f0bf0ea555eb60a393377d6bfe8d379e15135 (diff)
downloadafl++-3ff4ca348c344bded53f53b0d0c4b020a188f26e.tar.gz
fix k-ctx
-rw-r--r--src/afl-cc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 3f75c549..b354077e 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -1442,9 +1442,11 @@ int main(int argc, char **argv, char **envp) {
}
- if (strncasecmp(ptr2, "ctx-", strlen("ctx-")) == 0) {
+ if (strncasecmp(ptr2, "ctx-", strlen("ctx-")) == 0 ||
+ strncasecmp(ptr2, "kctx-", strlen("c-ctx-")) == 0 ||
+ strncasecmp(ptr2, "k-ctx-", strlen("k-ctx-")) == 0) {
- u8 *ptr3 = ptr2 + strlen("ctx-");
+ u8 *ptr3 = ptr2;
while (*ptr3 && (*ptr3 < '0' || *ptr3 > '9'))
ptr3++;
@@ -1480,7 +1482,7 @@ int main(int argc, char **argv, char **envp) {
}
- if (strncasecmp(ptr2, "ctx", strlen("ctx")) == 0) {
+ if (strcasecmp(ptr2, "ctx") == 0) {
instrument_opt_mode |= INSTRUMENT_OPT_CTX;
setenv("AFL_LLVM_CTX", "1", 1);