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 possible nullptr dereference in serverpackethandler.cpp #15941

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

ricardoglc
Copy link
Contributor

The lockedGetClientNoEx function can return a nullptr, since it is the "no exception" version of GetClient. These two places are not checking for a valid client pointer and can result in a segfault when dereferencing it a few lines below.

lockedGetClientNoEx can return a nullptr
@sfan5 sfan5 added Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines Code quality One approval ✅ ◻️ labels Mar 25, 2025
@sfan5 sfan5 merged commit 251bf0e into luanti-org:master Mar 26, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines >= Two approvals ✅ ✅
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants