forked from OSchip/llvm-project
[dsymutil] Fix use-after-free when sys::path::append grows the buffer.
<rdar://problem/50117620> llvm-svn: 359003
This commit is contained in:
parent
c7bde29cfe
commit
53bd7ce42e
|
@ -328,9 +328,9 @@ static Expected<OutputLocation> getOutputFileName(llvm::StringRef InputFile) {
|
|||
return std::move(E);
|
||||
|
||||
llvm::sys::path::append(Path, "Contents", "Resources");
|
||||
StringRef ResourceDir = Path;
|
||||
std::string ResourceDir = Path.str();
|
||||
llvm::sys::path::append(Path, "DWARF", llvm::sys::path::filename(DwarfFile));
|
||||
return OutputLocation(Path.str(), ResourceDir.str());
|
||||
return OutputLocation(Path.str(), ResourceDir);
|
||||
}
|
||||
|
||||
/// Parses the command line options into the LinkOptions struct and performs
|
||||
|
|
Loading…
Reference in New Issue