Permalink
Browse files

Debugger: Selector 0 or any selector type == 0 is not valid

  • Loading branch information...
joncampbell123 committed Mar 13, 2018
1 parent 754db01 commit 1954621a1c4b52f557bbfe6c741c8e8ed64fc862
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/debug/debug.cpp
View
@@ -178,8 +178,10 @@ Bit64u LinMakeProt(Bit16u selector, Bit32u offset)
Descriptor desc;
if (cpu.gdt.GetDescriptor(selector,desc)) {
if (offset <= desc.GetLimit())
return desc.GetBase()+offset;
if (selector >= 8 && desc.Type() != 0) {
if (offset <= desc.GetLimit())
return desc.GetBase()+offset;
}
}
return mem_no_address;

0 comments on commit 1954621

Please sign in to comment.