-
Notifications
You must be signed in to change notification settings - Fork 573
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
Downtime::AddDowntime(): NULL-check pointer before deref not to crash #10049
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Al2Klimov
added
bug
Something isn't working
area/api
REST API
core/crash
Shouldn't happen, requires attention
ref/IP
consider backporting
Should be considered for inclusion in a bugfix release
labels
Apr 23, 2024
ref/NC/789598 |
julianbrost
reviewed
Apr 24, 2024
…heir names to avoid names of vanished objects.
👍 |
Al2Klimov
force-pushed
the
AddDowntime-trigger_name
branch
from
April 24, 2024 15:07
3e602f6
to
045438a
Compare
julianbrost
requested changes
Apr 25, 2024
… itself not just its name.
For this purpose lookup the specified Downtime. Also pass Downtime objects, not just names, to Downtime::AddDowntime() not to lookup it twice.
Al2Klimov
force-pushed
the
AddDowntime-trigger_name
branch
from
April 25, 2024 10:14
045438a
to
5f80ac1
Compare
julianbrost
approved these changes
Apr 25, 2024
This was referenced Aug 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/api
REST API
bug
Something isn't working
cla/signed
consider backporting
Should be considered for inclusion in a bugfix release
core/crash
Shouldn't happen, requires attention
ref/IP
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The method already checks whether triggeredBy is empty before GetByName(triggeredBy). But a non-empty string doesn't necessarily name an existing Downtime. I.e. the pointer from GetByName(triggeredBy) must be NULL-checked.
ref/IP/46868
CC @tbauriedel
Edit
Btw. complain on such bad input via API.