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

Be sure to validate return code when calling sysctlbyname function (C… #2394

Merged
merged 3 commits into from Feb 21, 2019
Merged

Be sure to validate return code when calling sysctlbyname function (C… #2394

merged 3 commits into from Feb 21, 2019

Conversation

@dloic
Copy link
Contributor

@dloic dloic commented Feb 14, 2019

Hi!

This is a simple PR to fix an issue related to not checking return code of a C function.
The issue was raised by a static code/binary analysis we use to validate our app.

Firebase SDK (in DynamicLinks part) is using the C function sysctlbyname without being sure the call was successful.
The issue is related to the following CWE: http://cwe.mitre.org/data/definitions/391.html.

Let me know if I should made any other adjustment to this PR.

Best regards.

@dloic
Copy link
Contributor Author

@dloic dloic commented Feb 14, 2019

I did fix the issue with whitespace, forgot to run the script to check before first commit.

Loading

@paulb777
Copy link
Member

@paulb777 paulb777 commented Feb 21, 2019

Hi @dloic Thanks for the contribution! And sorry about our slow response.

The whitespace issue is fixed, and travis is now showing a style issue from clang-format. Please run the script ./scripts/style.sh with the right version of clang-format.

Loading

@paulb777
Copy link
Member

@paulb777 paulb777 commented Feb 21, 2019

cc: @dmandar

Loading

@dloic
Copy link
Contributor Author

@dloic dloic commented Feb 21, 2019

@paulb777 no worries for slow response :) I did run the script and git add the changes. I'm now aware of what is required before pushing another PR!

Loading

@paulb777 paulb777 added this to the M44 milestone Feb 21, 2019
Copy link
Member

@paulb777 paulb777 left a comment

Thanks!

Loading

@paulb777 paulb777 merged commit 056342d into firebase:master Feb 21, 2019
2 checks passed
Loading
@firebase firebase locked and limited conversation to collaborators Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants