diff --git a/scanners/workingset_scanner.cpp b/scanners/workingset_scanner.cpp index 0a5c027d8..3af80e7c0 100644 --- a/scanners/workingset_scanner.cpp +++ b/scanners/workingset_scanner.cpp @@ -25,22 +25,23 @@ namespace pesieve { } return false; } + + inline bool match_to_tag(std::ofstream& patch_report, const char delimiter, size_t start_offset, const sig_finder::Match &match) + { + if (patch_report.is_open() && match.sign) { + patch_report << std::hex << match.offset + start_offset; + patch_report << delimiter; + patch_report << match.sign->name; + patch_report << delimiter; + patch_report << match.sign->size(); + patch_report << std::endl; + return true; + } + return false; + } }; -inline bool match_toTAG(std::ofstream& patch_report, const char delimiter, size_t start_offset, sig_finder::Match match) -{ - if (patch_report.is_open() && match.sign) { - patch_report << std::hex << match.offset + start_offset; - patch_report << delimiter; - patch_report << match.sign->name; - patch_report << delimiter; - patch_report << match.sign->size(); - patch_report << std::endl; - return true; - } - return false; -} size_t WorkingSetScanReport::generateTags(const std::string& reportPath) { if (matched_patterns.size() == 0) { @@ -54,7 +55,7 @@ size_t WorkingSetScanReport::generateTags(const std::string& reportPath) size_t count = 0; for (auto itr = matched_patterns.begin(); itr != matched_patterns.end(); itr++) { sig_finder::Match m = *itr; - if (match_toTAG(patch_report, ';', this->match_area_start, m)) count++; + if (match_to_tag(patch_report, ';', this->match_area_start, m)) count++; } if (patch_report.is_open()) { patch_report.close(); @@ -62,6 +63,8 @@ size_t WorkingSetScanReport::generateTags(const std::string& reportPath) return count; } +//--- + bool pesieve::WorkingSetScanner::checkAreaContent(IN MemPageData& memPage, OUT WorkingSetScanReport* my_report) { if (!memPage.load()) { diff --git a/sig_finder b/sig_finder index 5c552ff22..c1fc6cd49 160000 --- a/sig_finder +++ b/sig_finder @@ -1 +1 @@ -Subproject commit 5c552ff22e9ddd352077559e7beb364da5910d9b +Subproject commit c1fc6cd49585c07fb47edb9eb08fbb444277e56e