Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.10] gh-95778: CVE-2020-10735: Prevent DoS by very large int() #96501

Merged
merged 11 commits into from
Sep 2, 2022
Prev Previous commit
Next Next commit
Fix the docs build.
  • Loading branch information
gpshead committed Sep 2, 2022
commit adab0bf3e8b455ef521899e17258749032e721df
6 changes: 4 additions & 2 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5437,7 +5437,7 @@ The limit is applied to the number of digit characters in the input or output
string when a non-linear conversion algorithm would be involved. Underscores
and the sign are not counted towards the limit.

When an operation would exceed the limit, a :exc:`ValueError` is raised::
When an operation would exceed the limit, a :exc:`ValueError` is raised:

.. doctest::

Expand All @@ -5464,7 +5464,9 @@ The default limit is 4300 digits as provided in
The lowest limit that can be configured is 640 digits as provided in
:data:`sys.int_info.str_digits_check_threshold <sys.int_info>`.

Verification::
Verification:

.. doctest::

>>> import sys
>>> assert sys.int_info.default_max_str_digits == 4300, sys.int_info
Expand Down