aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.96k stars 1.05k forks source link

change argument to avoid UB in pointer dreference #2870

Closed sbiscigl closed 7 months ago

sbiscigl commented 7 months ago

Issue #, if available:

issues/2862

Description of changes:

Fixes a UB issue when built with GCC and _GLIBCXX_ASSERTIONS turned on. It is specifically that we are passing a nullptr to a function where it is not used, it is only used in the S3 client. Although it will not actually cause runtime UB a compiler will flag it as such, and we should fix it.

Check all that applies:

Check which platforms you have built SDK on to verify the correctness of this PR.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.