mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
RSX: Fix UB in FIFO_control::get_current_arg_ptr()
This commit is contained in:
parent
583ec5d819
commit
8ed2089070
1 changed files with 5 additions and 1 deletions
|
@ -233,7 +233,11 @@ namespace rsx
|
|||
else
|
||||
{
|
||||
// Return a raw pointer with no limited access
|
||||
return {static_cast<const u32*>(vm::base(m_iotable->get_addr(m_internal_get))), 0x10000};
|
||||
constexpr u32 _1m = 0x100000;
|
||||
const u32 base = m_iotable->get_addr(m_internal_get);
|
||||
const u32 base_1m = m_iotable->get_addr(m_internal_get + _1m);
|
||||
|
||||
return {static_cast<const u32*>(vm::base(base)), (base_1m - _1m == base ? _1m : (_1m - (m_internal_get % _1m))) / 4 };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue