diff --git a/llvm/lib/MC/XCOFFObjectWriter.cpp b/llvm/lib/MC/XCOFFObjectWriter.cpp --- a/llvm/lib/MC/XCOFFObjectWriter.cpp +++ b/llvm/lib/MC/XCOFFObjectWriter.cpp @@ -99,7 +99,7 @@ // stored separately, e.g. the .data section containing read-write, descriptor, // TOCBase and TOC-entry csects. struct Section { - char Name[XCOFF::NameSize]; + char Name[XCOFF::NameSize + 1]; // The physical/virtual address of the section. For an object file // these values are equivalent. uint32_t Address;