We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
strcpy
DS_FileCreateDest
strncpy
Checklist (Please check before submitting)
Describe the bug Pathname from cmd used in strcpy, could overflow table Pathname if not terminated:
DS/fsw/src/ds_cmds.c
Line 766 in 9d0651c
If DestFile->Pathname isn't null terminated garbage could be added to the Workname which gets copied back to the file name:
DS/fsw/src/ds_file.c
Line 588 in 9d0651c
To Reproduce This was actually happening in the test, although the test overflowed the buffer to get this condition:
DS/unit-test/ds_file_tests.c
Lines 1038 to 1042 in 9d0651c
Expected behavior Only copy up to the size of the Pathname.
Code snips See above
System observed on: CI
Additional context None
Reporter Info Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered:
Fix nasa#46, Resolve possible string buffer overflows
598379a
Merge pull request #47 from skliper/fix46-strcpy_overflows
96e2021
Fix #46 #48 #49 #50, Resolve multiple static analysis issues (includes bug fixes) and remove unnecessary UT handlers
skliper
Successfully merging a pull request may close this issue.
Checklist (Please check before submitting)
Describe the bug
Pathname from cmd used in strcpy, could overflow table Pathname if not terminated:
DS/fsw/src/ds_cmds.c
Line 766 in 9d0651c
If DestFile->Pathname isn't null terminated garbage could be added to the Workname which gets copied back to the file name:
DS/fsw/src/ds_file.c
Line 588 in 9d0651c
To Reproduce
This was actually happening in the test, although the test overflowed the buffer to get this condition:
DS/unit-test/ds_file_tests.c
Lines 1038 to 1042 in 9d0651c
Expected behavior
Only copy up to the size of the Pathname.
Code snips
See above
System observed on:
CI
Additional context
None
Reporter Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: