-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto/types: check for overflow and unreasonably large element count (…
…#9163) Ensure that we don't pass overflowed values into make, because a clever attacker could see that to cause: (bits+7)/8 to become negative, they just have to make (bits+7) become negative simply by >=maxint-6 but also reject unreasonably large element count like >2**32, which while arbitrary is super duper large for a bit array. Fixes #9162
- Loading branch information
Showing
2 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters