[ros-bugs] [Bug 4856] Total Commander 7.5a crashes with page fault

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Wed Nov 16 14:58:57 UTC 2011


http://www.reactos.org/bugzilla/show_bug.cgi?id=4856


vicmarcal <vicmarcal at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vicmarcal at hotmail.com




--- Comment #16 from vicmarcal <vicmarcal at hotmail.com>  2011-11-16 14:58:56 CET ---
>The Total Commander comboboxes for the left and right drive list
>are Unicode. However, Total Commander calls
>SendMessage(handle,CB_ADDSTRING,0,(LPARAM)ansitext);
>to add items as ANSI text. This seems to work, but it's adding some
>extra text at the end.

If I understood correctly, Total Commander is calling SendMessage, which in
this case is translated to SendMessageW (as the comboboxes are Unicode).

So TC is calling SendMessageW to append an ANSI string to a Combobox.
Let's give a look to SendMessageW thanks to Doxygen:
http://doxygen.reactos.org/da/d64/winuser_8h_a18e5b961d742150a18d3039b5dd88d98.html#a18e5b961d742150a18d3039b5dd88d98

02161   Result = NtUserMessageCall( Wnd,
02162                               KMMsg.message, 
02163                               KMMsg.wParam,
02164                               KMMsg.lParam,
02165                              (ULONG_PTR)&Result,
02166                               FNID_SENDMESSAGE,
02167                               FALSE);

Line 2167 FALSE is the BOOL ANSI param of NtUserMessageCall.

But in this case the BOOL ANSI must be TRUE as the string is really ANSI.

Feel free to correct me, but seems that SendMessageW is able to set both kind
of strings ANSI and UNICODE in Windows, while we are forcing to our
SendMessageW(and AnyMessageW) implementation to treat them as UNICODE always.
Am I wrong? 
This could be a big potential issue as this could affect to any message call. 


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the Ros-bugs mailing list