diff options
| author | van Hauser <vh@thc.org> | 2020-06-09 19:25:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-09 19:25:09 +0200 |
| commit | 12bdefe00e38cdc3dd8cb028eeac325ab2e94e16 (patch) | |
| tree | 0d321d362a19ff19a4a98dcd1b9b72601945695f /llvm_mode/afl-llvm-lto-whitelist.so.cc | |
| parent | 748238d6ab4aeb7f34958d4c37c5ef200ad22463 (diff) | |
| parent | 81829d132bebcb42c0e289bb5788b8f2b29c1599 (diff) | |
| download | afl++-12bdefe00e38cdc3dd8cb028eeac325ab2e94e16.tar.gz | |
Merge pull request #392 from AFLplusplus/dev
Push to master
Diffstat (limited to 'llvm_mode/afl-llvm-lto-whitelist.so.cc')
| -rw-r--r-- | llvm_mode/afl-llvm-lto-whitelist.so.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm_mode/afl-llvm-lto-whitelist.so.cc b/llvm_mode/afl-llvm-lto-whitelist.so.cc index 8856ce21..33d40da8 100644 --- a/llvm_mode/afl-llvm-lto-whitelist.so.cc +++ b/llvm_mode/afl-llvm-lto-whitelist.so.cc @@ -36,6 +36,7 @@ #include <string> #include <fstream> #include <sys/time.h> +#include <fnmatch.h> #include "llvm/IR/DebugInfo.h" #include "llvm/IR/BasicBlock.h" @@ -175,9 +176,8 @@ bool AFLwhitelist::runOnModule(Module &M) { * specified in the list. */ if (instFilename.str().length() >= it->length()) { - if (instFilename.str().compare( - instFilename.str().length() - it->length(), it->length(), - *it) == 0) { + if (fnmatch(("*" + *it).c_str(), instFilename.str().c_str(), 0) == + 0) { instrumentFunction = true; break; |
