about summary refs log tree commit diff
path: root/instrumentation/cmplog-routines-pass.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-12-24 11:08:26 +0100
committerGitHub <noreply@github.com>2023-12-24 11:08:26 +0100
commitdcb5bc3fa5b48b316719cb6abab856697dc29bda (patch)
tree71f058cf819e53307ef24c5092b38b72f5b321fe /instrumentation/cmplog-routines-pass.cc
parent108fb0b29ad1586e668ba23e23a0eb1a13c45c49 (diff)
parentdaaefcddc063b356018c29027494a00bcfc3e240 (diff)
downloadafl++-dcb5bc3fa5b48b316719cb6abab856697dc29bda.tar.gz
Merge pull request #1941 from AFLplusplus/dev
push to stable
Diffstat (limited to 'instrumentation/cmplog-routines-pass.cc')
-rw-r--r--instrumentation/cmplog-routines-pass.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/instrumentation/cmplog-routines-pass.cc b/instrumentation/cmplog-routines-pass.cc
index 54e9ddf3..b27e06e0 100644
--- a/instrumentation/cmplog-routines-pass.cc
+++ b/instrumentation/cmplog-routines-pass.cc
@@ -385,7 +385,8 @@ bool CmpLogRoutines::hookRtns(Module &M) {
           isStrcmp &=
               FT->getNumParams() == 2 && FT->getReturnType()->isIntegerTy(32) &&
               FT->getParamType(0) == FT->getParamType(1) &&
-              FT->getParamType(0) == IntegerType::getInt8PtrTy(M.getContext());
+              FT->getParamType(0) ==
+                  IntegerType::getInt8Ty(M.getContext())->getPointerTo(0);
 
           bool isStrncmp = (!FuncName.compare("strncmp") ||
                             !FuncName.compare("xmlStrncmp") ||
@@ -398,12 +399,12 @@ bool CmpLogRoutines::hookRtns(Module &M) {
                             !FuncName.compare("g_ascii_strncasecmp") ||
                             !FuncName.compare("Curl_strncasecompare") ||
                             !FuncName.compare("g_strncasecmp"));
-          isStrncmp &= FT->getNumParams() == 3 &&
-                       FT->getReturnType()->isIntegerTy(32) &&
-                       FT->getParamType(0) == FT->getParamType(1) &&
-                       FT->getParamType(0) ==
-                           IntegerType::getInt8PtrTy(M.getContext()) &&
-                       FT->getParamType(2)->isIntegerTy();
+          isStrncmp &=
+              FT->getNumParams() == 3 && FT->getReturnType()->isIntegerTy(32) &&
+              FT->getParamType(0) == FT->getParamType(1) &&
+              FT->getParamType(0) ==
+                  IntegerType::getInt8Ty(M.getContext())->getPointerTo(0) &&
+              FT->getParamType(2)->isIntegerTy();
 
           bool isGccStdStringStdString =
               Callee->getName().find("__is_charIT_EE7__value") !=