Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
Operating System: ReactOS
Platform: x86 Hardware
Description
Created an attachment (id=5660)
See description.
[KERNEL32]
Callers of FilenameU2A_FitOrFail always perform the MAX_PATH test on the wrapped unicode API, but do not test the supplied buffer length being > MAX_PATH.
Because ANSI_STRING.MaximumLength is an USHORT, a destLen with 65536 causes it to be set to 0. Fix this by selecting the smaller value of destLen and MAX_PATH as MaximumLength.
Fixes two path related kernel32 winetests on GetCurrentDirectoryA():
http://reactos.org/testman/detail.php?id=1271580
path.c:462: Test failed: wrong result foo
path.c:467: Test failed: wrong result foo