about summary refs log tree commit diff
path: root/instrumentation/afl-llvm-dict2file.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-07-24 14:50:57 +0200
committerGitHub <noreply@github.com>2024-07-24 14:50:57 +0200
commitdb23931e7c1727ddac8691a6241c97b2203ec6fc (patch)
tree7b3c3bcb8db3aa3e42835edf27be5baea1097c42 /instrumentation/afl-llvm-dict2file.so.cc
parent19ca7b3761f5abff8b72770d6bbfbde80ef5b985 (diff)
parent6e37f9b237ed12193688c86b6a527f32793f157e (diff)
downloadafl++-db23931e7c1727ddac8691a6241c97b2203ec6fc.tar.gz
Merge pull request #2172 from AFLplusplus/dev
push to stable
Diffstat (limited to 'instrumentation/afl-llvm-dict2file.so.cc')
-rw-r--r--instrumentation/afl-llvm-dict2file.so.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/instrumentation/afl-llvm-dict2file.so.cc b/instrumentation/afl-llvm-dict2file.so.cc
index b93f61f0..6559bc84 100644
--- a/instrumentation/afl-llvm-dict2file.so.cc
+++ b/instrumentation/afl-llvm-dict2file.so.cc
@@ -661,6 +661,13 @@ bool AFLdict2filePass::runOnModule(Module &M) {
             Value       *op2 = callInst->getArgOperand(2);
             ConstantInt *ilen = dyn_cast<ConstantInt>(op2);
 
+            if (!ilen) {
+
+              op2 = callInst->getArgOperand(1);
+              ilen = dyn_cast<ConstantInt>(op2);
+
+            }
+
             if (ilen) {
 
               uint64_t literalLength = optLen;