mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +00:00
- Clarify a check and don't cast KPCR->GDT to PKIPCR (spotted by Timo).
svn path=/trunk/; revision=43862
This commit is contained in:
parent
43e17b4127
commit
c4d8068980
1 changed files with 4 additions and 4 deletions
|
@ -27,10 +27,10 @@ Ke386GetGdtEntryThread(IN PKTHREAD Thread,
|
||||||
IN ULONG Offset,
|
IN ULONG Offset,
|
||||||
IN PKGDTENTRY Descriptor)
|
IN PKGDTENTRY Descriptor)
|
||||||
{
|
{
|
||||||
/* Make sure the offset is inside the allowed range */
|
/* Make sure the offset isn't outside the allowed range */
|
||||||
if (!((Offset) < (KGDT_NUMBER * sizeof(KGDTENTRY))))
|
if (Offset >= (KGDT_NUMBER * sizeof(KGDTENTRY)))
|
||||||
{
|
{
|
||||||
/* It isn't, fail */
|
/* It is, fail */
|
||||||
return STATUS_ACCESS_VIOLATION;
|
return STATUS_ACCESS_VIOLATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ Ke386GetGdtEntryThread(IN PKTHREAD Thread,
|
||||||
{
|
{
|
||||||
/* Get the descriptor entry from the GDT */
|
/* Get the descriptor entry from the GDT */
|
||||||
RtlCopyMemory(Descriptor,
|
RtlCopyMemory(Descriptor,
|
||||||
(PCHAR)((PKIPCR)KeGetPcr()->GDT) + Offset,
|
(PVOID)(((ULONG_PTR)KeGetPcr()->GDT) + Offset),
|
||||||
sizeof(KGDTENTRY));
|
sizeof(KGDTENTRY));
|
||||||
|
|
||||||
/* Check if this is the TEB selector */
|
/* Check if this is the TEB selector */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue