[PATCH] server: Make sure pids/tids are multiples of four.
Alexandre Julliard
julliard at winehq.org
Fri Apr 24 10:33:59 CDT 2020
Rémi Bernon <rbernon at codeweavers.com> writes:
> See: https://devblogs.microsoft.com/oldnewthing/?p=23283
>
> Street Fighter V unpacker relies on it when validating other processes
> for its anti-debug checks, it uses (PID&0xfffffffc)>>2 as an array index
> and then checks back indexes against PIDs, and terminates early if some
> PIDs do not match.
>
> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
> ---
> server/process.c | 31 ++++++++++++++++++-------------
> 1 file changed, 18 insertions(+), 13 deletions(-)
This could use some test cases, in particular for ptids with lower bits
set.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list