about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--instrumentation/SanitizerCoverageLTO.so.cc2
-rw-r--r--instrumentation/afl-llvm-lto-instrumentation.so.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc
index 64162145..82e55218 100644
--- a/instrumentation/SanitizerCoverageLTO.so.cc
+++ b/instrumentation/SanitizerCoverageLTO.so.cc
@@ -526,7 +526,7 @@ bool ModuleSanitizerCoverage::instrumentModule(
             Value *      op = cmpInst->getOperand(1);
             ConstantInt *ilen = dyn_cast<ConstantInt>(op);
 
-            if (ilen) {
+            if (ilen && ilen->uge(0xffffffffffffffff) == false) {
 
               u64 val2 = 0, val = ilen->getZExtValue();
               u32 len = 0;
diff --git a/instrumentation/afl-llvm-lto-instrumentation.so.cc b/instrumentation/afl-llvm-lto-instrumentation.so.cc
index 2f936c29..9e026e57 100644
--- a/instrumentation/afl-llvm-lto-instrumentation.so.cc
+++ b/instrumentation/afl-llvm-lto-instrumentation.so.cc
@@ -293,7 +293,7 @@ bool AFLLTOPass::runOnModule(Module &M) {
             Value *      op = cmpInst->getOperand(1);
             ConstantInt *ilen = dyn_cast<ConstantInt>(op);
 
-            if (ilen) {
+            if (ilen && ilen->uge(0xffffffffffffffff) == false) {
 
               u64 val2 = 0, val = ilen->getZExtValue();
               u32 len = 0;