summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Support/TarWriter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Support/TarWriter.cpp b/llvm/lib/Support/TarWriter.cpp
index 5ae64741c52..5009607a478 100644
--- a/llvm/lib/Support/TarWriter.cpp
+++ b/llvm/lib/Support/TarWriter.cpp
@@ -127,6 +127,7 @@ static void writePaxHeader(raw_fd_ostream &OS, StringRef Path) {
// Otherwise, returns false.
static bool splitUstar(StringRef Path, StringRef &Prefix, StringRef &Name) {
if (Path.size() < sizeof(UstarHeader::Name)) {
+ Prefix = "";
Name = Path;
return true;
}
OpenPOWER on IntegriCloud