OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bf9685
)
[dsymutil] Fix use-after-free when sys::path::append grows the buffer.
author
Adrian Prantl
<aprantl@apple.com>
Tue, 23 Apr 2019 15:44:22 +0000
(15:44 +0000)
committer
Adrian Prantl
<aprantl@apple.com>
Tue, 23 Apr 2019 15:44:22 +0000
(15:44 +0000)
<rdar://problem/
50117620
>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359003
91177308
-0d34-0410-b5e6-
96231b3b80d8
tools/dsymutil/dsymutil.cpp
patch
|
blob
|
history
diff --git
a/tools/dsymutil/dsymutil.cpp
b/tools/dsymutil/dsymutil.cpp
index
3256984
..
2e835e4
100644
(file)
--- a/
tools/dsymutil/dsymutil.cpp
+++ b/
tools/dsymutil/dsymutil.cpp
@@
-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