mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 09:00:17 +02:00
x32/Thread: Fix off-by-one in get_thread_area
12, 13, and 14 are the only valid TLS areas.
This commit is contained in:
1 parent
77467eaf0c
commit
37b1432514
1 file changed
+1
-1
@@ -154,7 +154,7 @@ void RegisterThread(FEX::HLE::SyscallHandler* Handler) {
|
||||
REGISTER_SYSCALL_IMPL_X32(get_thread_area, [](FEXCore::Core::CpuStateFrame* Frame, struct user_desc* u_info) -> uint64_t {
|
||||
// Index to fetch comes from the user_desc
|
||||
uint32_t Entry = u_info->entry_number;
|
||||
if (Entry < TLS_NextEntry || Entry > TLS_MaxEntry) {
|
||||
if (Entry < TLS_NextEntry || Entry >= TLS_MaxEntry) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user