Skip to content
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

Merged
merged 1 commit into from
Jul 22, 2018

Conversation

matt335672
Copy link
Member

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

@@ -256,6 +256,7 @@ rdpmouseControl(DeviceIntPtr device, int what)
map[6] = 6;
map[7] = 7;
map[8] = 8;
map[9] = 9;
Copy link
Member

@metalefty metalefty Jul 20, 2018

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?

@matt335672
Copy link
Member Author

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.

@metalefty
Copy link
Member

Squash it! Then I'll merge.

@matt335672
Copy link
Member Author

Squashed.

@metalefty metalefty merged commit 7bd3f72 into neutrinolabs:devel Jul 22, 2018
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Aug 10, 2018
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
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Aug 10, 2018
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
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this pull request Aug 10, 2018
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
swills pushed a commit to swills/freebsd-ports that referenced this pull request Aug 12, 2018
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
svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this pull request Jan 10, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants