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

Missing socketpair initialization in client library #2326

Closed
zanettea opened this issue Sep 24, 2021 · 3 comments
Closed

Missing socketpair initialization in client library #2326

zanettea opened this issue Sep 24, 2021 · 3 comments
Labels
Component: libmosquitto Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Milestone

Comments

@zanettea
Copy link

In mosquitto_reinitialise the socketpairR/W should be initialized as invalid as mosq->sock is, since, otherwise, if the function returns because the client id is missing or invalid, socketpairs still are valid handles (namely 0) and a further call to moquitto_destroy could try to close them causing unexpected behaviors in the hosting application.

@ralight
Copy link
Contributor

ralight commented Sep 24, 2021

Thank you, this is a good find. I've now fixed it in the fixes branch.

@ralight ralight added Component: libmosquitto Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug labels Sep 24, 2021
@ralight ralight added this to the 2.0.13 milestone Sep 24, 2021
@ralight
Copy link
Contributor

ralight commented Sep 24, 2021

Sorry, we just overlapped on fixing it!

@zanettea
Copy link
Author

Np, thanks for the lighting fast fix :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: libmosquitto Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants