about summary refs log tree commit diff
path: root/instrumentation/SanitizerCoverageLTO.so.cc
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-11-23 19:34:21 +0100
committervanhauser-thc <vh@thc.org>2021-11-23 19:34:21 +0100
commit11f89ab785f0b74c0862c46406f81007ac5cf3ba (patch)
tree0350e6b7e1060b48474ca828264e6b87af789c2b /instrumentation/SanitizerCoverageLTO.so.cc
parent39e2003630220bf2567a9f9d1babd0b32604a8c3 (diff)
downloadafl++-11f89ab785f0b74c0862c46406f81007ac5cf3ba.tar.gz
do not add zero byte on string compares with len
Diffstat (limited to 'instrumentation/SanitizerCoverageLTO.so.cc')
-rw-r--r--instrumentation/SanitizerCoverageLTO.so.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc
index 4e25221a..dbe4672c 100644
--- a/instrumentation/SanitizerCoverageLTO.so.cc
+++ b/instrumentation/SanitizerCoverageLTO.so.cc
@@ -922,13 +922,16 @@ bool ModuleSanitizerCoverage::instrumentModule(
             // was not already added
             if (!isMemcmp) {
 
-              if (addedNull == false && thestring[optLen - 1] != '\0') {
+              /*
+                            if (addedNull == false && thestring[optLen - 1] !=
+                 '\0') {
 
-                thestring.append("\0", 1);  // add null byte
-                optLen++;
+                              thestring.append("\0", 1);  // add null byte
+                              optLen++;
 
-              }
+                            }
 
+              */
               if (!isStdString) {
 
                 // ensure we do not have garbage