mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 13:05:27 +00:00
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
This commit is contained in:
parent
1807e385d7
commit
94074a84d0
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue