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

fix: dangling string in DebugCmd::Reload #3981

Merged
merged 1 commit into from
Oct 24, 2024
Merged

fix: dangling string in DebugCmd::Reload #3981

merged 1 commit into from
Oct 24, 2024

Conversation

kostasrim
Copy link
Contributor

@kostasrim kostasrim commented Oct 24, 2024

string_view opt = absl::AsciiStrToUpper(ArgS(args, i)); temporary string returned from AsciiStrToUpper() bound to string_view

@kostasrim kostasrim self-assigned this Oct 24, 2024
@@ -489,7 +489,7 @@ void DebugCmd::Reload(CmdArgList args) {
bool save = true;

for (size_t i = 1; i < args.size(); ++i) {
string_view opt = absl::AsciiStrToUpper(ArgS(args, i));
string opt = absl::AsciiStrToUpper(ArgS(args, i));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you rewrite the whole Debug command with CmdArgParser.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do, just not in this PR. Got other things to fix :(

@kostasrim kostasrim enabled auto-merge (squash) October 24, 2024 09:47
@kostasrim kostasrim merged commit b716040 into main Oct 24, 2024
12 checks passed
@kostasrim kostasrim deleted the kpr4 branch October 24, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants