Closed HTHou closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 63.63%. Comparing base (
6c4f911
) to head (78d120f
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fixes https://github.com/apache/tsfile/security/code-scanning/11
To fix the problem, we need to ensure that the multiplication is performed using a larger integer type to prevent overflow. This can be achieved by casting one of the operands to
size_t
before performing the multiplication. This way, the multiplication will be done using thesize_t
type, which is typically larger thanunsigned int
and can hold larger values.The specific change involves casting
items
tosize_t
before multiplying it bysize
on line 313. This ensures that the multiplication is performed using thesize_t
type, preventing overflow.Suggested fixes powered by Copilot Autofix. Review carefully before merging.