Skip to content
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

fixed dangling pointer using std::string #3112

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

randaz81
Copy link
Member

@randaz81 randaz81 commented Jun 4, 2024

Fix for: #3105
I'm aware that std::string is not a plain char*.
..but do we need to stick to this oooooold '99 style in libyarpmanager? I think not.
BTW, strings are used elsewhere in the same lib.

@randaz81 randaz81 requested a review from Nicogene as a code owner June 4, 2024 13:48
Copy link

update-docs bot commented Jun 4, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update the release notes by adding a file in doc/release/<target_branch>, based on your changes.

Nicogene
Nicogene previously approved these changes Jun 4, 2024
Copy link

sonarcloud bot commented Aug 28, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
29.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@randaz81 randaz81 merged commit b26883d into robotology:master Aug 30, 2024
48 of 50 checks passed
@@ -569,14 +568,14 @@ const char* YarpBroker::requestRpc(const char* szport, const char* request, doub
NetworkBase::disconnect(port.getName(), szport);
if(!response.size() || !ret) {
port.close();
return nullptr;
return {};
}

port.close();
return response.toString().c_str();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the c_str() needed here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants