Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix std::bad_alloc on pci_devices on Apple Silicon macs #7648

Merged
merged 3 commits into from
Jun 24, 2022

Conversation

sharvilshah
Copy link
Member

@sharvilshah sharvilshah commented Jun 23, 2022

Sometimes querying pci_devices on Apple Silicon macs would result in std::bad_alloc.
The way to trigger this would be select * from pci_devices in quick succession (about 10ish times). This was because we were not doing bounds check on a vector

@sharvilshah sharvilshah requested review from a team as code owners June 23, 2022 22:20
directionless
directionless previously approved these changes Jun 24, 2022
Copy link
Member

@directionless directionless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems better than it is today!

osquery/utils/conversions/darwin/iokit.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants