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 use after free in Main.cpp (issue #846) #871

Merged
merged 3 commits into from
Nov 29, 2019
Merged

Conversation

dtomlinson-ga
Copy link
Contributor

@dtomlinson-ga dtomlinson-ga commented Nov 27, 2019

Create c-string to store filepath before concatenating with output message. Fix #846

Create c-string to store filepath before concatenating with output message.
@dtomlinson-ga
Copy link
Contributor Author

I don't know if this is the best way to go about doing this, but I wanted to dip my toes into contributing to this project. Let me know if anything needs to change :)

Copy link
Owner

@yvt yvt left a comment

Choose a reason for hiding this comment

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

Thank you for the pull request! Unfortunately there still seems to be a use-after-free. There are two now, actually.

Sources/Gui/Main.cpp Outdated Show resolved Hide resolved
Changed variable type to std::string and moved c_str() call
Sources/Gui/Main.cpp Outdated Show resolved Hide resolved
Removed reference to directory variable
@yvt yvt merged commit fefce1b into yvt:master Nov 29, 2019
Conticop pushed a commit to Conticop/OpenSpades that referenced this pull request Dec 23, 2019
* Fix use after free in Main.cpp (issue yvt#846)

Create c-string to store filepath before concatenating with output message.

* Fix use after free in Main.cpp

Changed variable type to std::string and moved c_str() call

* Fix use after free in Main.cpp

Removed reference to directory variable
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