You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling]
because xdg_data_home + ... creates a temporary std::string which is destroyed at the end of the line, and text then points into that destroyed string.
The text was updated successfully, but these errors were encountered:
* Fix use after free in Main.cpp (issue #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
Conticop
pushed a commit
to Conticop/OpenSpades
that referenced
this issue
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
On latest clang trunk, the code
in https://github.com/yvt/openspades/blob/master/Sources/Gui/Main.cpp#L428
causes the warning
because
xdg_data_home + ...
creates a temporarystd::string
which is destroyed at the end of the line, andtext
then points into that destroyed string.The text was updated successfully, but these errors were encountered: