From 8c4435e7ef6cad7a0d475603469e98c09d32f504 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Tue, 23 Nov 2021 21:07:50 +0100 Subject: fix for llvm < 11 --- instrumentation/SanitizerCoverageLTO.so.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'instrumentation/SanitizerCoverageLTO.so.cc') diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc index 7710e262..37726607 100644 --- a/instrumentation/SanitizerCoverageLTO.so.cc +++ b/instrumentation/SanitizerCoverageLTO.so.cc @@ -930,7 +930,8 @@ bool ModuleSanitizerCoverage::instrumentModule( } */ - if (!isStdString) { + if (!isStdString && + thestring.find('\0', 0) != std::string::npos) { // ensure we do not have garbage size_t offset = thestring.find('\0', 0); -- cgit 1.4.1