Skip to content

Conversation

@fgalan
Copy link
Member

@fgalan fgalan commented Nov 8, 2024

Fixes https://github.com/telefonicaid/fiware-orion/security/code-scanning/9

To fix the problem, we need to ensure that the format string used in the snprintf function is not directly influenced by user input. Instead, we should use a constant format string and pass the user input as an argument to avoid format string vulnerabilities.

The best way to fix this issue without changing existing functionality is to replace the snprintf call on line 2381 with a constant format string and pass the text variable as an argument. This change should be made in the src/lib/logMsg/logMsg.cpp file.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

fgalan and others added 2 commits November 8, 2024 10:44
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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 this pull request may close these issues.

2 participants