-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix invalid memory access in rdpmouseControl() #124
Fix invalid memory access in rdpmouseControl() #124
Conversation
xrdpmouse/rdpMouse.c
Outdated
@@ -256,6 +256,7 @@ rdpmouseControl(DeviceIntPtr device, int what) | |||
map[6] = 6; | |||
map[7] = 7; | |||
map[8] = 8; | |||
map[9] = 9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks! What about using for loop like seen in xorg and vnc code?
Fair point. I've added a loop and used a macro for the number of buttons like everyone else seems to. If you're happy with that let me know and I'll squash the commits. |
Squash it! Then I'll merge. |
87b4c93
to
cad9094
Compare
Squashed. |
Backport these fixes for invalid memory access: - neutrinolabs/xorgxrdp#124 - neutrinolabs/xorgxrdp#125 Approved by: hrs (mentor) Obtained from: upstream Relnotes: https://github.com/neutrinolabs/xorgxrdp/releases/tag/v0.2.7 Sponsored by: HAW International, Inc. Differential Revision: https://reviews.freebsd.org/D16601 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@476807 35697150-7ecd-e111-bb59-0022644237b5
Backport these fixes for invalid memory access: - neutrinolabs/xorgxrdp#124 - neutrinolabs/xorgxrdp#125 Approved by: hrs (mentor) Obtained from: upstream Relnotes: https://github.com/neutrinolabs/xorgxrdp/releases/tag/v0.2.7 Sponsored by: HAW International, Inc. Differential Revision: https://reviews.freebsd.org/D16601
Backport these fixes for invalid memory access: - neutrinolabs/xorgxrdp#124 - neutrinolabs/xorgxrdp#125 Approved by: hrs (mentor) Obtained from: upstream Relnotes: https://github.com/neutrinolabs/xorgxrdp/releases/tag/v0.2.7 Sponsored by: HAW International, Inc. Differential Revision: https://reviews.freebsd.org/D16601 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@476807 35697150-7ecd-e111-bb59-0022644237b5
Backport these fixes for invalid memory access: - neutrinolabs/xorgxrdp#124 - neutrinolabs/xorgxrdp#125 Approved by: hrs (mentor) Obtained from: upstream Relnotes: https://github.com/neutrinolabs/xorgxrdp/releases/tag/v0.2.7 Sponsored by: HAW International, Inc. Differential Revision: https://reviews.freebsd.org/D16601 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@476807 35697150-7ecd-e111-bb59-0022644237b5
Backport these fixes for invalid memory access: - neutrinolabs/xorgxrdp#124 - neutrinolabs/xorgxrdp#125 Approved by: hrs (mentor) Obtained from: upstream Relnotes: https://github.com/neutrinolabs/xorgxrdp/releases/tag/v0.2.7 Sponsored by: HAW International, Inc. Differential Revision: https://reviews.freebsd.org/D16601
This is one of a couple of pull requests to address the memory issues found in #104 by @keithrob91.
This is the simpler of the two and corresponds to the last paragraph of the issue raised.
The second argument of the call to InitPointerDeviceStruct() is an array based at 1, rather than 0. This can be seen in other projects. See for example vncPointerProc() from TigerVNC's unix/xserver/hw/vnc/Input.c. The Xorg code on the other end is in xserver/dix/devices.c