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 assert fail for unverified WMI request result #7921

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

hdnn
Copy link
Contributor

@hdnn hdnn commented Jan 26, 2023

In debug mode an osquery::Expected class object will asserted in destructor, if it's not checked for results.
When we check multiple osquery::Expected objects in single if, in case of first one has error, the second one will not be checked and osquery::Expected object destructor will assert.
So, every osquery::Expected must be checked explicitly

@hdnn hdnn requested review from a team as code owners January 26, 2023 13:38
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 26, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

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.

Talking to @Smjert this problem may effect other places. But this code is reasonable and we should merge it

@directionless directionless merged commit f15b05a into osquery:master Feb 14, 2023
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.

None yet

2 participants