Skip to content

Conversation

@grzanka
Copy link
Contributor

@grzanka grzanka commented Mar 23, 2025

Potential fix for https://github.com/libamtrack/library/security/code-scanning/1

To fix the problem, we need to ensure that the multiplication is performed using double precision to avoid overflow. This can be achieved by casting one of the operands to double before performing the multiplication. This way, the multiplication will be done using double precision, and the result will not overflow.

  • Cast cur_d_check_Gy to double before performing the multiplication.
  • Update the assignment on line 658 to use the casted value.

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

…nverted to larger type

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@grzanka grzanka self-assigned this Mar 23, 2025
@grzanka grzanka marked this pull request as ready for review March 23, 2025 07:54
@grzanka grzanka merged commit eb0c5b9 into master Mar 23, 2025
8 checks passed
@grzanka grzanka deleted the alert-autofix-1 branch March 23, 2025 08:25
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