-
Notifications
You must be signed in to change notification settings - Fork 30
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 #87, Check return value of stat() #125
Merged
dzbaker
merged 1 commit into
nasa:main
from
thnkslprpt:fix-87-check-return-value-of-stat
Jul 2, 2024
Merged
Fix #87, Check return value of stat() #125
dzbaker
merged 1 commit into
nasa:main
from
thnkslprpt:fix-87-check-return-value-of-stat
Jul 2, 2024
Conversation
This file contains 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
if (Verbose) | ||
printf("%s: Destination file permissions after open = 0x%X\n", DstFilename, dststat.st_mode); | ||
chmod(DstFilename, dststat.st_mode & ~(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH)); | ||
stat(DstFilename, &dststat); | ||
|
||
if (stat(DstFilename, &dststat) != 0) |
Check warning
Code scanning / CodeQL-coding-standard
Side effect in a Boolean expression
This Boolean expression is not side-effect free.
jphickey
approved these changes
May 23, 2024
2 tasks
dzbaker
added a commit
to nasa/cFS
that referenced
this pull request
Jul 2, 2024
*Combines:* cFE equuleus-rc1+dev137 osal equuleus-rc1+dev66 elf2cfetbl equuleus-rc1+dev56 **Includes:** *cFS* - #707 - #773 *cFE* - nasa/cFE#2560 - nasa/cFE#2344 - nasa/cFE#2359 - nasa/cFE#2376 - nasa/cFE#2496 - nasa/cFE#2554 - nasa/cFE#2568 - nasa/cFE#2566 *osal* - nasa/osal#1456 - nasa/osal#1465 *elf2cfetbl* - nasa/elf2cfetbl#147 - nasa/elf2cfetbl#124 - nasa/elf2cfetbl#125 - nasa/elf2cfetbl#127 Co-authored by: Avi Weiss <thnkslprpt@users.noreply.github.com> Co-authored by: Justin Figueroa <chillfig@users.noreply.github.com> Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored by: Jacob Hageman <skliper@users.noreply.github.com> Co-authored by: Anh Van <avan989@users.noreply.github.com>
dzbaker
added a commit
to nasa/cFS
that referenced
this pull request
Jul 2, 2024
*Combines:* cFE equuleus-rc1+dev137 osal equuleus-rc1+dev66 elf2cfetbl equuleus-rc1+dev56 **Includes:** *cFS* - #707 - #773 *cFE* - nasa/cFE#2560 - nasa/cFE#2344 - nasa/cFE#2359 - nasa/cFE#2376 - nasa/cFE#2496 - nasa/cFE#2554 - nasa/cFE#2568 - nasa/cFE#2566 *osal* - nasa/osal#1456 - nasa/osal#1465 *elf2cfetbl* - nasa/elf2cfetbl#147 - nasa/elf2cfetbl#124 - nasa/elf2cfetbl#125 - nasa/elf2cfetbl#127 Co-authored by: Avi Weiss <thnkslprpt@users.noreply.github.com> Co-authored by: Justin Figueroa <chillfig@users.noreply.github.com> Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored by: Jacob Hageman <skliper@users.noreply.github.com> Co-authored by: Anh Van <avan989@users.noreply.github.com>
dzbaker
added a commit
to nasa/cFS
that referenced
this pull request
Jul 2, 2024
*Combines:* cFE equuleus-rc1+dev137 osal equuleus-rc1+dev66 elf2cfetbl equuleus-rc1+dev56 **Includes:** *cFS* - #707 - #773 *cFE* - nasa/cFE#2560 - nasa/cFE#2344 - nasa/cFE#2359 - nasa/cFE#2376 - nasa/cFE#2496 - nasa/cFE#2554 - nasa/cFE#2568 - nasa/cFE#2566 *osal* - nasa/osal#1456 - nasa/osal#1465 *elf2cfetbl* - nasa/elf2cfetbl#147 - nasa/elf2cfetbl#124 - nasa/elf2cfetbl#125 - nasa/elf2cfetbl#127 Co-authored by: Avi Weiss <thnkslprpt@users.noreply.github.com> Co-authored by: Justin Figueroa <chillfig@users.noreply.github.com> Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored by: Jacob Hageman <skliper@users.noreply.github.com> Co-authored by: Anh Van <avan989@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
Describe the contribution
stat
in case of error return, and prints an error message.FAILURE
, as thechmod
may well have been successful, and following this there is only an informational message (about the file permissions).Testing performed
GitHub CI actions (incl. Codeql Build etc.) all passing successfully excl. CodeQL-security for apparently pre-existing issues that are being flagged now.
Expected behavior changes
No impact on behavior.
Adds error message for an (unlikely) error return from
stat()
.Contributor Info
Avi Weiss @thnkslprpt