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 select issue on FreeBSD. #1660

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Conversation

X-Ryl669
Copy link
Contributor

@X-Ryl669 X-Ryl669 commented Sep 29, 2023

As reported in issue #1654, using select to test for a (non-blocking) connection success crashes on FreeBSD when the number of opened file descriptor is higher than FDSET_SIZE.

Instead of returning with an error in that case (and skipping the connection test), this commit uses poll instead that's not limited to the number of opened file descriptors, preventing an out-of-bound write.

Fix #1654

@ejurgensen
Copy link
Member

Looks great. Just one small issue, could you edit the commit message to have the same convention as (most of) the rest. E.g. "[mdns] Fix select() causing overflow on FreeBSD".

@X-Ryl669
Copy link
Contributor Author

Ok, no problem.

@ejurgensen
Copy link
Member

The commit message is still the same, did you remember to push?

As reported in issue owntone#1654, using select to test for a (non-blocking) connection success crashes on FreeBSD when the number of opened file descriptor is higher than FDSET_SIZE.
Instead of returning with an error in that case, this commit uses poll instead that's not limited to the number of opened file descriptors, preventing an out-of-bound write.
@X-Ryl669
Copy link
Contributor Author

X-Ryl669 commented Oct 2, 2023

Sorry, I forgot to push it. I've merged with the recent master too.

@ejurgensen ejurgensen merged commit c34acb1 into owntone:master Oct 2, 2023
@ejurgensen
Copy link
Member

Merged, thanks

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.

Owntone crashes on FreeBSD with large library; nothing in logs even at SPAM
2 participants