Be sure to validate return code when calling sysctlbyname function (C… - #2394
Merged
Conversation
…WE-391: Unchecked Error Condition)
Contributor
Author
|
I did fix the issue with whitespace, forgot to run the script to check before first commit. |
Member
|
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. |
Member
|
cc: @dmandar |
Contributor
Author
|
@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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.