[Bug 27331] New: kernel32.GetLocaleInfoA/W needs to be more strict about invalid LCTYPE values (Dirt3 installer shows language selection with empty strings)
wine-bugs at winehq.org
wine-bugs at winehq.org
Sun May 29 13:33:52 CDT 2011
http://bugs.winehq.org/show_bug.cgi?id=27331
Summary: kernel32.GetLocaleInfoA/W needs to be more strict
about invalid LCTYPE values (Dirt3 installer shows
language selection with empty strings)
Product: Wine
Version: 1.3.21
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: kernel32
AssignedTo: wine-bugs at winehq.org
ReportedBy: focht at gmx.net
Hello,
encountered this while looking at "Dirt 3" game installer ...
The installer enumerates install languages and builds a listbox filled with
empty language strings.
For whatever reason the installer calls kernel32.GetLocaleInfoA/W with LCTYPE
0x73 which seems to be invalid (didn't find any info in MSDN/PDK)?
Wine doesn't validate these "holes" and returns success:
--- snip ---
0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x73,0x32ea04,256)
0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x73,0x32ea04,256) returning 1
L""
0009:trace:listbox:ListBoxWndProc_common [0x10068]: msg LB_ADDSTRING wp
00000000 lp 0032ee04
...
0009:trace:listbox:LISTBOX_InsertString [0x10068]: added item 0 L""
0009:trace:listbox:ListBoxWndProc_common [0x10068]: msg LB_SETITEMDATA wp
00000000 lp 00000409
--- snip ---
http://source.winehq.org/git/wine.git/blob/HEAD:/include/winnls.h#l296
--- snip include/winnls.h ---
296 #define LOCALE_IREADINGLAYOUT 0x0070
297 #define LOCALE_INEUTRAL 0x0071
298 #define LOCALE_INEGATIVEPERCENT 0x0074
--- snip include/winnls.h ---
If these holes are rejected (ERROR_INVALID_FLAGS), the installer gets it right
and uses a proper way of retrieving language names:
--- snip ---
0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x4,0x32ea04,256)
0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x4,0x32ea04,256) returning 8
L"English"
0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x8,0x32ec04,256)
0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x8,0x32ec04,256) returning 14
L"United States"
0009:trace:listbox:ListBoxWndProc_common [0x10068]: msg LB_ADDSTRING wp
00000000 lp 0032ee04
...
0009:trace:listbox:LISTBOX_InsertString [0x10068]: added item 0 L"English
(United States)"
...
--- snip ---
Regards
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list