-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 nil pointer dereference on Placement #5996
Conversation
The check for empty object exposed a lack of check for `*Placement` before accessing its fields. This commit properly fixes it. Signed-off-by: Tomasz Pietrek <[email protected]>
think we need coverage of sending empty objects on the other endpoints that might have been relying on filtering out empty fields. also for this one need a test of sending unitialized placement like |
Will add a test. Did a brief check of others usages and it seems fine, but will test to be sure. |
Signed-off-by: Tomasz Pietrek <[email protected]>
Added a test, but I wonder if it makes sense to have it - empty object test achieves the same as |
Signed-off-by: Tomasz Pietrek <[email protected]>
Checked other endpoints that are using new function. We do not have pointers in them. |
@Jarema you're right in this case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The check for empty object exposed a lack of check for `*Placement` before accessing its fields. This commit properly fixes it. Signed-off-by: Tomasz Pietrek <[email protected]> --------- Signed-off-by: Tomasz Pietrek <[email protected]>
The check for empty object exposed a lack of check for
*Placement
before accessing its fields. This commit properly fixes it.Signed-off-by: Tomasz Pietrek [email protected]