Index: src/processor/exploitability_win.cc |
diff --git a/src/processor/exploitability_win.cc b/src/processor/exploitability_win.cc |
index a1f8703a6ef0c14fd365e9f3e3b31eac1ba0f726..5b9d8d92bb2415da323b779707f7347cc764a7e9 100644 |
--- a/src/processor/exploitability_win.cc |
+++ b/src/processor/exploitability_win.cc |
@@ -44,7 +44,7 @@ |
#include "processor/disassembler_x86.h" |
#include "processor/logging.h" |
-#include "third_party/libdisasm/libdis.h" |
+//#include "third_party/libdisasm/libdis.h" |
namespace google_breakpad { |
@@ -224,15 +224,11 @@ ExploitabilityRating ExploitabilityWin::CheckPlatformExploitability() { |
if (disassembler.currentInstructionValid()) { |
// Check if the faulting instruction falls into one of |
// several interesting groups. |
- switch (disassembler.currentInstructionGroup()) { |
- case libdis::insn_controlflow: |
- exploitability_weight += kLargeBump; |
- break; |
- case libdis::insn_string: |
- exploitability_weight += kHugeBump; |
- break; |
- default: |
- break; |
+ if (disassembler.currentInstructionIsGroup(X86_GRP_JUMP) || |
+ disassembler.currentInstructionIsGroup(X86_GRP_CALL)) { |
+ exploitability_weight += kLargeBump; |
+ } else if (disassembler.currentInstructionIsBlockData()) { |
+ exploitability_weight += kHugeBump; |
} |
// Loop the disassembler through the code and check if it |
// IDed any interesting conditions in the near future. |