This is an archive of the discontinued LLVM Phabricator instance.

Fix a stack-smasher in PlatformMacOSX::GetSDKDirectory()
ClosedPublic

Authored by aprantl on Apr 26 2019, 5:10 PM.

Details

Summary

GetSDKVersion expects the number of version fields not their byte size and will happily overwrite later contents of the stack.

I just found this by accident while stepping through the function and noticing that the backtrace disappears halfway through the function.

Diff Detail

Repository
rL LLVM

Event Timeline

aprantl created this revision.Apr 26 2019, 5:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2019, 5:10 PM
This revision is now accepted and ready to land.Apr 26 2019, 5:27 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2019, 10:26 AM