diff options
author | Kevin Enderby <enderby@apple.com> | 2017-02-06 21:01:08 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2017-02-06 21:01:08 +0000 |
commit | 418659fe99470fcc724e5cbe25de2aed6b3569bd (patch) | |
tree | 0e3d869f5371ac1c2bb98aee936cbcd1f687c922 /llvm/tools/llvm-objdump/MachODump.cpp | |
parent | a80cfb3063b7e4f01533748e90e97e73bbbb2e2b (diff) | |
download | bcm5719-llvm-418659fe99470fcc724e5cbe25de2aed6b3569bd.tar.gz bcm5719-llvm-418659fe99470fcc724e5cbe25de2aed6b3569bd.zip |
Fix a bug in llvm-obdump(1) with the -macho and -info-plist options
which caused it to print more than the (__TEXT,__info_plist) if that
section did not end with a null.
rdar://27378808
llvm-svn: 294236
Diffstat (limited to 'llvm/tools/llvm-objdump/MachODump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/MachODump.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp index b70e8256625..df1b74400ab 100644 --- a/llvm/tools/llvm-objdump/MachODump.cpp +++ b/llvm/tools/llvm-objdump/MachODump.cpp @@ -1142,7 +1142,7 @@ static void DumpInfoPlistSectionContents(StringRef Filename, StringRef BytesStr; Section.getContents(BytesStr); const char *sect = reinterpret_cast<const char *>(BytesStr.data()); - outs() << sect; + outs() << format("%.*s", BytesStr.size(), sect) << "\n"; return; } } |