Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: src/processor/exploitability_win.cc

Issue 1821293002: Replace libdisasm with capstone Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698