Skip to content

Bindgen generates getters and setters which access memory beyond "self" #954

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

Closed
glyn opened this issue Sep 7, 2017 · 1 comment · Fixed by #1149
Closed

Bindgen generates getters and setters which access memory beyond "self" #954

glyn opened this issue Sep 7, 2017 · 1 comment · Fixed by #1149

Comments

@glyn
Copy link
Contributor

glyn commented Sep 7, 2017

A getter can read bytes beyond "self" and a setter can read and write bytes beyond "self".

For instance, in this example, a getter copies 8 bytes from a 5 (I checked) byte struct. The setter in this example copies 8 bytes from a 5 byte struct and writes back an updated 8 bytes over the top of the struct.

@fitzgen
Copy link
Member

fitzgen commented Sep 7, 2017

Thanks for the bug report!

bors-servo pushed a commit that referenced this issue Nov 13, 2017
Avoid bitfield getters and setters accessing memory beyond "self"

This fixes #954.

r? @emilio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants