forked from swiftlang/swift-llbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix use-after-free in some helper methods
llvm::SmallString's str() method returns an llvm::StringRef, which does not copy the string data. When getShortDescription/getVerboseDescription return, the SmallString is deallocated and the underlying memory freed, causing the returned StringRef to be pointing to deallocated memory. Remove these functions and require the caller to provide their own string data instance, which the Command can then populate with data.
- Loading branch information
1 parent
3dd773b
commit d89170d
Showing
2 changed files
with
8 additions
and
16 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
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