Fix a crash when opening an XBE with an invalid TLS structure
This commit is contained in:
parent
86c3bbf947
commit
08228c30a1
|
@ -328,6 +328,10 @@ void EmuInitFS()
|
|||
// generate fs segment selector
|
||||
void EmuGenerateFS(Xbe::TLS *pTLS, void *pTLSData)
|
||||
{
|
||||
// Make sure the TLS Start and End addresses are within Xbox Memory
|
||||
if (pTLS->dwDataStartAddr > XBOX_MEMORY_SIZE || pTLS->dwDataEndAddr > XBOX_MEMORY_SIZE) {
|
||||
return;
|
||||
}
|
||||
|
||||
NT_TIB *OrgNtTib;
|
||||
xboxkrnl::KPCR *NewPcr;
|
||||
|
|
Loading…
Reference in New Issue