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 length of abstract socket address #1120

Merged
merged 1 commit into from
Sep 4, 2019
Merged

Fix length of abstract socket address #1120

merged 1 commit into from
Sep 4, 2019

Conversation

yshui
Copy link
Contributor

@yshui yshui commented Sep 4, 2019

NULL bytes have no special significance in an abstrace address, and the
length of the address is solely decided by the length member. If the
length is set to sun_path.len(), all the NULL bytes will be considered
part of the address.

Tests are updated accordingly.

Closes #1119

Signed-off-by: Yuxuan Shui yshuiv7@gmail.com

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix. Could you also please add a note to CHANGELOG?

@yshui
Copy link
Contributor Author

yshui commented Sep 4, 2019

@asomers done

@asomers
Copy link
Member

asomers commented Sep 4, 2019

CHANGELOG entries should all have a link to the PR.

NULL bytes have no special significance in an abstrace address, and the
length of the address is solely decided by the length member. If the
length is set to sun_path.len(), all the NULL bytes will be considered
part of the address.

Tests are updated accordingly.

Closes #1119

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@yshui
Copy link
Contributor Author

yshui commented Sep 4, 2019

@asomers fixed

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

bors bot added a commit that referenced this pull request Sep 4, 2019
1120: Fix length of abstract socket address r=asomers a=yshui

NULL bytes have no special significance in an abstrace address, and the
length of the address is solely decided by the length member. If the
length is set to sun_path.len(), all the NULL bytes will be considered
part of the address.

Tests are updated accordingly.

Closes #1119

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>

Co-authored-by: Yuxuan Shui <yshuiv7@gmail.com>
@bors
Copy link
Contributor

bors bot commented Sep 4, 2019

Build succeeded

@bors bors bot merged commit 39d158a into nix-rust:master Sep 4, 2019
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.

UnixAddr::new_abstract() is using the wrong length
2 participants