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

Wrong type of arguments to snprintf #362

Open
ArielSAdamsNASA opened this issue Oct 3, 2022 · 0 comments
Open

Wrong type of arguments to snprintf #362

ArielSAdamsNASA opened this issue Oct 3, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@ArielSAdamsNASA
Copy link

Describe the bug
Function call with incorrect argument type. This argument should be of type 'unsigned int' but is of type 'PCS_WIND_TCB *'.

Expected behavior
Same behavior, fix error

Code snips

snprintf(ReasonBuf, ReasonSize, "Vector=0x%06X, vxWorks Task Name=%s, Task ID=0x%08X", Buffer->context_info.vector,
TaskName, Buffer->sys_task_id);

System observed on:
VxWorks 6.9/MCP750

Additional context
From CodeQL
Use "%08lX" as the format and explicitly cast the argument as "(unsigned long)"

Reporter Info
Ariel Adams, MCSG Tech

@ArielSAdamsNASA ArielSAdamsNASA added the enhancement New feature or request label Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant