Skip to content

Conversation

lucaderi
Copy link
Member

Fixes https://github.com/ntop/nDPI/security/code-scanning/12

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

The best way to fix this is to cast index to uint64_t before the multiplication. This change should be made on line 478 of the file src/lib/third_party/include/binaryfusefilter.h.

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

…rger type

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link

@lucaderi lucaderi marked this pull request as ready for review January 13, 2025 19:13
@lucaderi lucaderi merged commit 082a9ad into dev Jan 13, 2025
36 of 37 checks passed
@IvanNardi IvanNardi deleted the alert-autofix-12 branch February 13, 2025 12:27
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.

1 participant