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

Conversation

@dloic
Copy link
Contributor

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.

Loïc Dardant

@googlebot googlebot added the cla: yes label Feb 14, 2019

Loïc Dardant
@dloic

This comment has been minimized.

Copy link
Contributor Author

commented Feb 14, 2019

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

@paulb777

This comment has been minimized.

Copy link
Member

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.

@paulb777

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

cc: @dmandar

Loïc Dardant
@dloic

This comment has been minimized.

Copy link
Contributor Author

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!

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

@paulb777
Copy link
Member

left a comment

Thanks!

@paulb777 paulb777 merged commit 056342d into firebase:master Feb 21, 2019

2 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.