Skip to content

Commit 311c8b3

Browse files
authored
Merge pull request swiftlang#9120 from adrian-prantl/133647826
Fix a nullptr deref in ObjectFileMachO.cpp
2 parents 3751470 + b2b44cb commit 311c8b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5226,10 +5226,10 @@ uint32_t ObjectFileMachO::GetDependentModules(FileSpecList &files) {
52265226
for (auto &rpath : rpath_paths) {
52275227
if (llvm::StringRef(rpath).startswith(loader_path)) {
52285228
rpath.erase(0, loader_path.size());
5229-
rpath.insert(0, this_file_spec.GetDirectory().GetCString());
5229+
rpath.insert(0, this_file_spec.GetDirectory().AsCString(""));
52305230
} else if (llvm::StringRef(rpath).startswith(executable_path)) {
52315231
rpath.erase(0, executable_path.size());
5232-
rpath.insert(0, this_file_spec.GetDirectory().GetCString());
5232+
rpath.insert(0, this_file_spec.GetDirectory().AsCString(""));
52335233
}
52345234
}
52355235

0 commit comments

Comments
 (0)