Skip to content

Conversation

@Permanence-AI-Coder
Copy link

The changes in this PR were automatically generated by the Permanence AI Coder and reviewed by @eelenberg and @jweese. Here, there are several products of 32-bit integers that are later promoted to a larger type. The result could overflow 32 bits before the promotion.

  • n * numQ used as the initial size of a vector
  • n * numBsk used as the initial size for a vector
  • j * n + k used as an index into txiqiDivqModqi

In each case, the values to be multiplied are cast to size_t first to avoid the potential overflow.

on-behalf-of: @permanence-ai [email protected]

The changes in this PR were automatically generated by the Permanence AI
Coder and reviewed by @eelenberg and @jweese. Here, there are several
products of 32-bit integers that are later promoted to a larger type. The
result could overflow 32 bits before the promotion.

- `n * numQ` used as the initial size of a vector
- `n * numBsk` used as the initial size for a vector
- `j * n + k` used as an index into `txiqiDivqModqi`

In each case, the values to be multiplied are cast to `size_t` first to
avoid the potential overflow.

on-behalf-of: @permanence-ai [email protected]
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