Skip to content

Commit

Permalink
Fix autotokens (AFLplusplus#2407)
Browse files Browse the repository at this point in the history
  • Loading branch information
tokatoka authored Jul 16, 2024
1 parent 4370a84 commit 074a16f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libafl_cc/src/autotokens-pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ bool AutoTokensPass::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;
optLen = ilen->getZExtValue();
Expand Down

0 comments on commit 074a16f

Please sign in to comment.