[Bug 37667] New: GetRawInputDeviceList() does not set an error code on failure
https://bugs.winehq.org/show_bug.cgi?id=37667 Bug ID: 37667 Summary: GetRawInputDeviceList() does not set an error code on failure Product: Wine Version: 1.7.32 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs(a)winehq.org Reporter: achurch+wine(a)achurch.org Distribution: --- Created attachment 50134 --> https://bugs.winehq.org/attachment.cgi?id=50134 gridl-fix.diff When GetRawInputDeviceList() is passed a buffer which is too small, the function should set the last error code to ERROR_INSUFFICIENT_BUFFER and return failure (see <http://msdn.microsoft.com/en-us/library/windows/desktop/ms645598(v=vs.85).aspx>). However, the current Wine implementation does not set the last error code, meaning that callers expecting to see ERROR_INSUFFICIENT_BUFFER will behave incorrectly. Patch attached (the patch is against wine-1.7.29 but the code is unchanged in git). -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de --- Comment #1 from Sebastian Lackner <sebastian(a)fds-team.de> --- Patches are not picked up from bugzilla. Please try to submit it as a patch to the mailing list, see http://wiki.winehq.org/SubmittingPatches for more information. As your information is based on MSDN (which is also very often wrong), it probably makes sense to add a test for that, too. (Just curious, but is this issue related to any real application?) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 --- Comment #2 from Andrew Church <achurch+wine(a)achurch.org> --- (In reply to Sebastian Lackner from comment #1)
Patches are not picked up from bugzilla. Please try to submit it as a patch to the mailing list, see http://wiki.winehq.org/SubmittingPatches for more information. As your information is based on MSDN (which is also very often wrong), it probably makes sense to add a test for that, too.
I'll look into that but I don't have a lot of spare cycles at the moment. For the record, (not that I think the patch is large enough to be copyrightable but) I release this patch into the public domain.
(Just curious, but is this issue related to any real application?)
Why else would I bother reporting it? (: -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 --- Comment #3 from Bruno Jesus <00cpxxx(a)gmail.com> --- (In reply to Andrew Church from comment #2)
(Just curious, but is this issue related to any real application?)
Why else would I bother reporting it? (:
It's a common practice to share the application name, usually in the bug subject. Something like: "Application XYZ needs GetRawInputDeviceList to set ERROR_INSUFFICIENT_BUFFER on too small buffer." -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 Andrew Church <achurch+wine(a)achurch.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|GetRawInputDeviceList() |Custom game development |does not set an error code |library needs |on failure |GetRawInputDeviceList to | |set | |ERROR_INSUFFICIENT_BUFFER | |on too small buffer -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht(a)gmx.net Ever confirmed|0 |1 --- Comment #4 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, obviously still present as of Wine 1.7.43 The patch from Andrew is available/included in Wine-Staging by default: https://github.com/wine-compholio/wine-staging/blob/master/patches/user32-Ge... Still missing test case though -or- provide the information on the app/version/download to reproduce/test the fix. It's as Bruno said: not providing certain information for whatever reasons ("employer/customer NDA", "secret home project", "distributed internet backup") makes the bug report automatically unattractive to others and you're basically on your own when it comes to get the issue analyzed/fixed in vanilla. Fortunately you figured it out on your own. Regards -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 --- Comment #5 from Andrew Church <achurch+wine(a)achurch.org> --- Patch (with test) sent to wine-devel. FYI, I posted this not in the sense of "help me fix this problem" but rather as an informational "this problem exists and here's the fix". I personally have no problem continuing to patch Wine (I already have something like a dozen local patches I apply to each release), but I thought it might be useful if the developers were interested in more closely matching Windows behavior. I am a bit surprised to hear that the Wine developers prefer mailing list threads over a bug tracker / code review system / etc for managing patches, but to each their own, I suppose. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e0ba6d8fdb9562810231df8fb0b | |37dd05188e3b8 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #6 from Bruno Jesus <00cpxxx(a)gmail.com> --- Fixed by http://source.winehq.org/git/wine.git/commitdiff/e0ba6d8fdb9562810231df8fb0b... -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #7 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.7.44. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37667 Qian Hong <fracting(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting(a)gmail.com -- 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.
participants (1)
-
wine-bugs@winehq.org