Skip to content

x.crypto.chacha20: add a check counter overflow to set_counter - #24365

Merged
spytheman merged 1 commit into
vlang:masterfrom
blackshirt:fix-chacha20-set-counter
Apr 30, 2025
Merged

spytheman merged 1 commit into
vlang:masterfrom
blackshirt:fix-chacha20-set-counter

Conversation

@blackshirt

@blackshirt blackshirt commented Apr 30, 2025 •

Copy link
Copy Markdown
Contributor

This small PR contains two small fix,

  1. The first part was adding check into .set_counter routine, especially in standard variant where its only allowing 32bit counter values.
  2. The second fixs the warning when run the test of chacha_64bitctr_test with -cstrict options, would lead into error: integer constant is so large that it is unsigned [-Werror] because counter was defined as int before changes.

Thanks

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-22741

@spytheman
spytheman merged commit f8c35b4 into vlang:master Apr 30, 2025
@blackshirt
blackshirt deleted the fix-chacha20-set-counter branch May 1, 2025 05:10
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