mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 02:10:27 +00:00
Transform GDT limit and compare with that
This commit is contained in:
parent
e011973593
commit
881b740eae
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ static relegated int GetDescriptor(struct Machine *m, int selector,
|
|||
uint8_t buf[8];
|
||||
DCHECK(m->gdt_base + m->gdt_limit <= m->real.n);
|
||||
selector &= -8;
|
||||
if (8 <= selector && selector + 8 <= m->gdt_limit) {
|
||||
if (8 <= selector && selector + 8 <= m->gdt_limit + 1) {
|
||||
SetReadAddr(m, m->gdt_base + selector, 8);
|
||||
*out_descriptor = Read64(m->real.p + m->gdt_base + selector);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue