Avoid nullptr dereference in sts creds provider client#173
Avoid nullptr dereference in sts creds provider client#173SergeyRyabinin wants to merge 4 commits into
Conversation
00837ff to
432073d
Compare
bretambrose
left a comment
There was a problem hiding this comment.
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 Report❌ 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.