Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixed potential access to freed memory on map loading
MapData could destruct FResourceLump objects before accessing them Loading of map .wad from .pk3 file is example of this case https://forum.zdoom.org/viewtopic.php?t=60972
- Loading branch information
1 parent
eddb179
commit 9b4e8ef
Showing
1 changed file
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9b4e8ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you didn't use a std::unique_ptr for this?
9b4e8ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO it's too many changes for nothing. To make it right and future-proof,
FResourceFile
should be owned bystd::shared_ptr
everywhere. I'm not sure that we really need this.