Skip to content

Fix rand function implementation for consistent and correct random number generation#93

Open
th555555 wants to merge 1 commit intoWinterChenS:masterfrom
th555555:fix-CVE-2021-23451
Open

Fix rand function implementation for consistent and correct random number generation#93
th555555 wants to merge 1 commit intoWinterChenS:masterfrom
th555555:fix-CVE-2021-23451

Conversation

@th555555
Copy link

@th555555 th555555 commented Apr 3, 2025

PR fixes rand function implementation to ensure correct random number generation within the specified range.

  • Updated to use a proper random number generation logic.
  • Added input validation to prevent invalid range arguments.

References:
https://nvd.nist.gov/vuln/detail/CVE-2021-23451
Maheshkumar-Kakade/otp-generator@b27de1c

…mber generation

Fix rand function implementation to ensure correct random number generation within the specified range.

Updated rand_original.java to use a proper random number generation logic.
Applied the same fix to rand_cloned.java to ensure consistency and correctness.
Added input validation to prevent invalid range arguments.
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