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

Check Return Value of chmod #86

Closed
ArielSAdamsNASA opened this issue Sep 27, 2021 · 0 comments · Fixed by #124
Closed

Check Return Value of chmod #86

ArielSAdamsNASA opened this issue Sep 27, 2021 · 0 comments · Fixed by #124

Comments

@ArielSAdamsNASA
Copy link

Describe the bug
Calling chmod(DstFilename, dststat.st_mode & 0xffffffc0U) without checking return value. This library function may fail and return an error code.

Expected behavior
Check the return value of chmod.

Code snips

chmod(DstFilename, dststat.st_mode & ~(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH));

System observed on:
Coverity: https://scan.coverity.com/projects/arielsadamsnasa-cfs-jsf-rules?tab=overview

Reporter Info
Ariel Adams, ASRC Federal

thnkslprpt added a commit to thnkslprpt/elf2cfetbl that referenced this issue Nov 12, 2022
thnkslprpt added a commit to thnkslprpt/elf2cfetbl that referenced this issue Nov 12, 2022
dzbaker added a commit that referenced this issue Jul 2, 2024
@dzbaker dzbaker closed this as completed in 935a55d Jul 2, 2024
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 a pull request may close this issue.

1 participant