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
This commit is contained in:
parent
30b075c4a5
commit
fb7fdb9426
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue