aboutsummaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-05-12 19:11:26 +0000
committercdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-05-12 19:11:26 +0000
commit94074a84d0907f7151b7f274606fcbcf1a248fd5 (patch)
treeda5a8091306fafb39c1be3e61287792c66352e64 /src/processor
parentFix linux-gate handling in LinuxDumper so it gets a valid debug ID (diff)
downloadbreakpad-94074a84d0907f7151b7f274606fcbcf1a248fd5.tar.xz
Fix null derefs in x86 dissasembler code.
BUG=428 TEST=N/A Review URL: http://breakpad.appspot.com/285001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@789 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/disassembler_x86.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/processor/disassembler_x86.cc b/src/processor/disassembler_x86.cc
index 76015f4a..7e41e4bf 100644
--- a/src/processor/disassembler_x86.cc
+++ b/src/processor/disassembler_x86.cc
@@ -174,7 +174,7 @@ u_int32_t DisassemblerX86::NextInstruction() {
switch (current_instr_.type) {
case libdis::insn_xor:
if (src && src->type == libdis::op_register &&
- dest->type == libdis::op_register &&
+ dest && dest->type == libdis::op_register &&
src->data.reg.id == bad_register_.id &&
src->data.reg.id == dest->data.reg.id)
register_valid_ = false;
@@ -192,7 +192,7 @@ u_int32_t DisassemblerX86::NextInstruction() {
case libdis::insn_xchg:
case libdis::insn_xchgcc:
if (dest && dest->type == libdis::op_register &&
- src->type == libdis::op_register) {
+ src && src->type == libdis::op_register) {
if (dest->data.reg.id == bad_register_.id)
memcpy(&bad_register_, &src->data.reg, sizeof(libdis::x86_reg_t));
else if (src->data.reg.id == bad_register_.id)