mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serialization] Ensure that a cached bridging header is null-terminated.
I'm not quite sure how to tickle this one, but the next commit adds more data after the cached header, at which point existing tests break. This could have already caused problems if no padding was needed in the bitstream. Swift SVN r21543
This commit is contained in:
@@ -484,8 +484,10 @@ void Serializer::writeInputFiles(FilenamesTy inputFiles,
|
||||
ImportedHeader.emit(ScratchRecord, publicImportSet.count(import),
|
||||
importedHeaderSize, importedHeaderModTime,
|
||||
importedHeader);
|
||||
if (!contents.empty())
|
||||
if (!contents.empty()) {
|
||||
contents.push_back('\0');
|
||||
ImportedHeaderContents.emit(ScratchRecord, contents);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user