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
This commit is contained in:
parent
250eae2452
commit
a93e77c1c7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue