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 global pointer pointing to local variable in uncrustify.cpp bugfix #4226

Merged

Conversation

JEAYNE
Copy link
Contributor

@JEAYNE JEAYNE commented Feb 3, 2024

BUG: In uncrustify.cpp the global pointer cdp.html_file points inside the local variable buffer.
This PR fixes this bug described in detail in #4216

@@ -696,7 +696,7 @@ int main(int argc, char *argv[])
const char *tracking_art = strtok(buffer, ":");
const char *html_file = strtok(nullptr, ":");

if (html_file != nullptr)
if (html_file != nullptr && cpd.html_file == nullptr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, put && on the next line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Guy,
Done.

Copy link
Collaborator

@gmaurel gmaurel left a comment

Choose a reason for hiding this comment

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

it is fine, thanks

@gmaurel gmaurel merged commit 34d730e into uncrustify:master Feb 5, 2024
3 checks passed
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.

None yet

2 participants