http://bugs.winehq.org/show_bug.cgi?id=15084
Summary: ReadConsoleInputW() handles a NULL lpNumberOfEventsRead parameter incorrectly Product: Wine Version: 1.1.3 Platform: Other OS/Version: other Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dg@cowlark.com
On the Windows console, if I try to read input events with ReadConsoleInputW() and pass in NULL as the pointer to the lpNumberOfEventsRead field, wine completes successfully where Windows XP fails and returns an error code.
http://bugs.winehq.org/show_bug.cgi?id=15084
--- Comment #1 from Austin English austinenglish@gmail.com 2008-09-01 18:43:51 --- A testcase would be useful.
http://bugs.winehq.org/show_bug.cgi?id=15084
--- Comment #2 from Austin English austinenglish@gmail.com 2009-03-10 15:05:38 --- Is this still an issue in current (1.1.16 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=15084
--- Comment #3 from David Given dg@cowlark.com 2009-03-10 15:33:40 --- Well, given that the latest version of ReadConsoleInputW() handles lpNumberOfEventsRead with code like this:
if (lpNumberOfEventsRead) *lpNumberOfEventsRead = idx;
...I'd say yes. But I'm not in a position to actually test this any more.
http://bugs.winehq.org/show_bug.cgi?id=15084
--- Comment #4 from Austin English austinenglish@gmail.com 2009-09-15 15:35:10 --- Is this still an issue in current (1.1.29 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=15084
--- Comment #5 from David Given dg@cowlark.com 2009-09-15 16:21:31 --- Well, given that the latest version of ReadConsoleInputW() *still* handles lpNumberOfEventsRead with code like this:
if (lpNumberOfEventsRead) *lpNumberOfEventsRead = idx;
...I'd say yes.
Is anybody actually reading these bug reports?
http://bugs.winehq.org/show_bug.cgi?id=15084
--- Comment #6 from Austin English austinenglish@gmail.com 2010-12-20 21:25:16 CST --- Still present.
http://bugs.winehq.org/show_bug.cgi?id=15084
--- Comment #7 from butraxz@gmail.com 2013-06-09 11:13:23 CDT --- This has not been updated for over 900 days.
Is this still an issue in 1.6-rc1 or higher or is this abandoned ?
http://bugs.winehq.org/show_bug.cgi?id=15084
--- Comment #8 from David Given dg@cowlark.com 2013-06-09 11:43:50 CDT --- Well, given that the latest version of ReadConsoleInputW() *still* handles lpNumberOfEventsRead with code like this:
if (lpNumberOfEventsRead) *lpNumberOfEventsRead = idx;
...I'd say yes.
https://bugs.winehq.org/show_bug.cgi?id=15084
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase Component|-unknown |kernel32 Hardware|Other |x86 OS|other |Linux
https://bugs.winehq.org/show_bug.cgi?id=15084
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|testcase | Severity|enhancement |normal
https://bugs.winehq.org/show_bug.cgi?id=15084
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #9 from super_man@post.com --- I think you are referring to this source code
http://source.winehq.org/git/wine.git/blob/65d699eb5f7fc151197f3dc9f36499ee3...
https://bugs.winehq.org/show_bug.cgi?id=15084
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24@gmail.com
--- Comment #10 from Alex Henrie alexhenrie24@gmail.com --- Created attachment 57273 --> https://bugs.winehq.org/attachment.cgi?id=57273 Test case and results
I played around with this today and Windows does not appear to handle this case consistently. The first time you call ReadConsoleInputW with a NULL count pointer, you get an error (or it just crashes), but if you call ReadConsoleInputW again with the same parameters, it pauses and waits for input. So, Wine's behavior here is not obviously incorrect.