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

Use sized char array for CFE_SB_GetAppTskName parameter and limit print #1465

Open
skliper opened this issue Apr 30, 2021 · 0 comments
Open

Comments

@skliper
Copy link
Contributor

skliper commented Apr 30, 2021

Is your feature request related to a problem? Please describe.
CFE_SB_GetAppTskName takes a char pointer FullName without an associated size. Relies on user to size the buffer correctly for the sprintf:

char *CFE_SB_GetAppTskName(CFE_ES_TaskId_t TaskId, char *FullName)

sprintf(FullName, "%s.%s", AppName, TskName);

Describe the solution you'd like
Related to #1457, explicitly size as an array and use snprintf to print to limit appropriately. Note #994 suggests moving this to a generic utility (out of SB scope), maybe ES API.

Describe alternatives you've considered
None

Additional context
Code review

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper changed the title Use sized char array for CFE_SB_GetAppTskName parameter Use sized char array for CFE_SB_GetAppTskName parameter and limit print Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant