Skip to content

Prevent signed integer overflow in LshTable#25641

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
vrabaud:lsh
May 27, 2024
Merged

Prevent signed integer overflow in LshTable#25641
asmorkalov merged 1 commit intoopencv:4.xfrom
vrabaud:lsh

Conversation

@vrabaud
Copy link
Copy Markdown
Contributor

@vrabaud vrabaud commented May 24, 2024

This can trigger some asan warning, though it is valid.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch

This change keeps everything as size_t and the expression is valid
because maxk_block > 0 in hte loop.
@vrabaud vrabaud requested a review from asmorkalov May 24, 2024 22:08
@asmorkalov asmorkalov self-assigned this May 25, 2024
@asmorkalov asmorkalov added this to the 4.10.0 milestone May 27, 2024
@asmorkalov asmorkalov merged commit c5976f7 into opencv:4.x May 27, 2024
@vrabaud vrabaud deleted the lsh branch May 27, 2024 12:57
@mshabunin mshabunin mentioned this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants