diff options
author | 2015-09-22 13:31:16 -0700 | |
---|---|---|
committer | 2015-09-22 13:31:16 -0700 | |
commit | 8b0b6f413d3cd8f16f13e26f401b838b859d1ed6 (patch) | |
tree | f705c66d328c92046030b3fe563d4e10cbf151f6 /src/cpp | |
parent | e456f77644e5ef5b60c7332136047ab3f5d4454e (diff) |
It is a bad idea to have a map with string_refs as output params.
This is very much unsafe as the string_ref could point on a stack
variable of the callee.
Diffstat (limited to 'src/cpp')
-rw-r--r-- | src/cpp/client/secure_credentials.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 99b7468e86..1693cf740b 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -173,7 +173,7 @@ void MetadataCredentialsPluginWrapper::GetMetadata( void MetadataCredentialsPluginWrapper::InvokePlugin( const char* service_url, grpc_credentials_plugin_metadata_cb cb, void* user_data) { - std::multimap<grpc::string, grpc::string_ref> metadata; + std::multimap<grpc::string, grpc::string> metadata; Status status = plugin_->GetMetadata(service_url, &metadata); std::vector<grpc_metadata> md; for (auto it = metadata.begin(); it != metadata.end(); ++it) { |