diff options
| author | Adrian Prantl <aprantl@apple.com> | 2019-04-29 17:28:38 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2019-04-29 17:28:38 +0000 |
| commit | a93e77c1c711ce19199e404d8e61e649384bd711 (patch) | |
| tree | f2296baf2fe9804268827d5f48999eaa37c9f7b3 /lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp | |
| parent | 250eae24528d1f10299a8cb35591e5b3899cefec (diff) | |
| download | bcm5719-llvm-a93e77c1c711ce19199e404d8e61e649384bd711.tar.gz bcm5719-llvm-a93e77c1c711ce19199e404d8e61e649384bd711.zip | |
Fix a stack-smasher in PlatformMacOSX::GetSDKDirectory()
GetSDKVersion expects the number of version fields not their byte size
and will happily overwrite later contents of the stack.
Differential Revision: https://reviews.llvm.org/D61218
llvm-svn: 359471
Diffstat (limited to 'lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp')
| -rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp index 8edcb8e0470..47b7b9f77eb 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp @@ -164,7 +164,7 @@ ConstString PlatformMacOSX::GetSDKDirectory(lldb_private::Target &target) { std::string default_xcode_sdk; FileSpec fspec; uint32_t versions[2]; - if (objfile->GetSDKVersion(versions, sizeof(versions))) { + if (objfile->GetSDKVersion(versions, 2)) { fspec = HostInfo::GetShlibDir(); if (fspec) { std::string path; |

