diff options
author | cdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-12-03 22:28:58 +0000 |
---|---|---|
committer | cdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-12-03 22:28:58 +0000 |
commit | fb7fdb9426ac53d17b7ba034264aa4ee4a50b19e (patch) | |
tree | 13254360553eeb205aaa182f55cc330f8296a369 /src/processor | |
parent | Fix WriteMemoryListStream to remove an extraneous loop index variable increment. (diff) | |
download | breakpad-fb7fdb9426ac53d17b7ba034264aa4ee4a50b19e.tar.xz |
Added null checks to disassembler_x86
Review URL: http://breakpad.appspot.com/239001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@736 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor')
-rw-r--r-- | src/processor/disassembler_x86.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/processor/disassembler_x86.cc b/src/processor/disassembler_x86.cc index 31af24fc..76015f4a 100644 --- a/src/processor/disassembler_x86.cc +++ b/src/processor/disassembler_x86.cc @@ -212,7 +212,7 @@ bool DisassemblerX86::setBadRead() { return false; libdis::x86_op_t *operand = libdis::x86_get_src_operand(¤t_instr_); - if (operand->type != libdis::op_expression) + if (!operand || operand->type != libdis::op_expression) return false; memcpy(&bad_register_, &operand->data.expression.base, @@ -226,7 +226,7 @@ bool DisassemblerX86::setBadWrite() { return false; libdis::x86_op_t *operand = libdis::x86_get_dest_operand(¤t_instr_); - if (operand->type != libdis::op_expression) + if (!operand || operand->type != libdis::op_expression) return false; memcpy(&bad_register_, &operand->data.expression.base, |