diff options
author | vanhauser-thc <vh@thc.org> | 2021-11-23 19:34:21 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-11-23 19:34:21 +0100 |
commit | 11f89ab785f0b74c0862c46406f81007ac5cf3ba (patch) | |
tree | 0350e6b7e1060b48474ca828264e6b87af789c2b /instrumentation/SanitizerCoverageLTO.so.cc | |
parent | 39e2003630220bf2567a9f9d1babd0b32604a8c3 (diff) | |
download | afl++-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.cc | 11 |
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 |