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

Incomplete OSAL error conversion in CFE_ES_ReloadApp #1723

Open
nmullane opened this issue Jul 28, 2021 · 0 comments · May be fixed by #2279
Open

Incomplete OSAL error conversion in CFE_ES_ReloadApp #1723

nmullane opened this issue Jul 28, 2021 · 0 comments · May be fixed by #2279

Comments

@nmullane
Copy link
Contributor

Describe the bug
The CFE_ES_ReloadApp function uses the function OS_stat to perform its work. The error handling in CFE_ES_ReloadApp assumes any failure in OS_stat is due to a file IO issue. This may not be the case because if a null pointer is passed in as the file name OS_stat will return an OS_INVALID_POINTER, but this specific error code will be ignored and CFE_ES_ReloadApp will just output CFE_ES_FILE_IO_ERR instead of a CFE_ES_BAD_ARGUMENT.

To Reproduce
Steps to reproduce the behavior:

  1. Call CFE_ES_ReloadApp with a null pointer for filename. It will return a CFE_ES_FILE_IO_ERR when the real issue was a bad argument.

Expected behavior
CFE_ES_ReloadApp could include a null check itself to provide a more specific error message or the OS_INVALID_POINTER returned by OS_stat could be converted to a specific CFE error code.

Additional context
See #1672 for a similar error conversion issue

Reporter Info
Niall Mullane - GSFC 582 Intern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants