krnl386.exe: Fix VxD filename format checks in __wine_vxd_open().
commitfc4726c22500ae507999ab9f3b0d66bc6d97397d
authorDamjan Jovanovic <damjan.jov@gmail.com>
Wed, 23 Feb 2022 03:16:13 +0000 (23 05:16 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 23 Feb 2022 09:34:51 +0000 (23 10:34 +0100)
treefdf0056c9a7e8b353480e470939bf6c44884ddd1
parentbf8c5afef1b3636266bbd2ca686cbebff4d7a849
krnl386.exe: Fix VxD filename format checks in __wine_vxd_open().

__wine_vxd_open() has several bugs. If filenameW doesn't end in
".vxd", it is wrongly
allowed to be over 8 characters long. If it does end in ".vxd", then a
maximum length
filename, eg. "12345678.vxd", always gets misdetected as being too long, as:
"lstrlenW( filenameW ) >= ARRAY_SIZE(name) - 4"
becomes 12 >= 12.

Rather do the checks for maximum filename length when we detect the
filename format.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/krnl386.exe16/vxd.c