Skip to content

Commit b2b44cb

Browse files
committed
Fix a nullptr deref in ObjectFileMachO.cpp
This code does not longer exist upstream, this is a surgical fix to eliminate a nullptrderef that we received a crash report for. rdar://133647826
1 parent 7c0ac3b commit b2b44cb

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)