A NetPlay server could claim an unbounded number of Wii save
entries. The client kept appending records after packet extraction
failed, allowing a small packet to exhaust memory.
Validate packet reads, bound counts to the Wii filesystem inode
limit, and reject inconsistent headers and invalid entry types
before applying the save.
The server retains timebase reports under client-controlled frame
numbers until every player reports the same frame. A client can send
distinct frames indefinitely and exhaust the host's memory.
Store one report per player for each frame and cap each player's
pending frames at 60. Also reject truncated reports and ignore reports
outside an active game.
Fixes: 04ca54623c
We originally only supported loading custom GPU drivers on Adreno
devices, but a8fc326 made us also show the custom GPU driver option on
Mali devices. Now I have found out from a user that custom GPU drivers
are also available for Xclipse. I think we should just remove the check
for what GPU the device has.
In the future, I would like to refactor HotkeyManager to give us a nice
way to have Android-exclusive hotkeys without relying on ifdefs. But I
want to get this one Android-exclusive hotkey into Dolphin before the
next release anyway, because this is one of the most requested hotkeys,
if not the most requested hotkey.
`RCConstraints::IsAnyConstraintActive()` was extremely inefficient.
It could be argued that, since it's only used in ASSERTs, they could have been changed to DEBUG_ASSERTs.
But with this, we can have them in release builds with little performance impact.
Also, the implementations of `RCConstraints` are moved to the header files, since they tend to be short and thus inline well.
All the low-hanging performance improvements for the register cache are now fixed, with profiling percentages being at expected values.
(Though more micro-optimizations are possible.)
Replace the "array of structure" design with a "structure of array". Boolean members are represented by a bitset.
The main benefit is that filtering the registers in regcache operations can be done in one simple bitwise instruction.
This is especially useful on `Flush`, as callers don't need anymore to limit the iterated registers for performance reasons.
The change only applies to the x86 regcache.
Dynamic input texture JSON could specify rectangles outside the base
image. CopyImageRegion then wrote replacement pixels beyond the
destination vector, allowing a crafted local texture pack to corrupt
the heap.
Validate coordinates and image bounds at the parser and caller. Make
CopyImageRegion independently reject invalid source or destination
ranges.