[Kernel] Don't trust buffer length in XamEnumerate when it matches items per enumerate.
This commit is contained in:
parent
db234309bf
commit
69463033b1
|
@ -198,10 +198,11 @@ dword_result_t XamEnumerate(dword_t handle, dword_t flags, lpvoid_t buffer,
|
|||
}
|
||||
}
|
||||
|
||||
size_t actual_buffer_length = e->item_size() * e->items_per_enumerate();
|
||||
if (actual_buffer_length != buffer_length) {
|
||||
size_t actual_buffer_length = (uint32_t)buffer_length;
|
||||
if (buffer_length == e->items_per_enumerate()) {
|
||||
actual_buffer_length = e->item_size() * e->items_per_enumerate();
|
||||
// Known culprits:
|
||||
// Final Fight: Double Impact
|
||||
// Final Fight: Double Impact (saves)
|
||||
XELOGW(
|
||||
"Broken usage of XamEnumerate! buffer length=%.X vs actual length=%.X "
|
||||
"(item size=%.X, items per enumerate=%u)",
|
||||
|
|
Loading…
Reference in New Issue