-
Notifications
You must be signed in to change notification settings - Fork 33
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
Avoid nullptr dereference in sts creds provider client #173
base: main
Are you sure you want to change the base?
Conversation
00837ff
to
432073d
Compare
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.
Seems fine but technically we would have crashed earlier because we're dereferencing provider_user_data from the very first line in the function.
254d686
to
3b54fb0
Compare
3b54fb0
to
8576d9a
Compare
thanks for the comment! The original finding was
where the ptr |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #173 +/- ##
=======================================
Coverage 79.54% 79.55%
=======================================
Files 33 33
Lines 5872 5873 +1
=======================================
+ Hits 4671 4672 +1
Misses 1201 1201 ☔ View full report in Codecov by Sentry. |
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.
When the provider_user_data is NULL, we never trigger the callback is wrong. I think the right solution would be to just fatal assert on provider_user_data being not NULL in s_make_request function, but I haven't traced through all the code paths.
Issue #, if available:
Subj, avoid nullptr dereference
Description of changes:
Check for ptr being non-null, don't call
(as already called in
s_clean_up_user_data
).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.