8000 [3.7] Correct CVE-2020-10735 documentation (GH-100306). (GH-100699) · python/cpython@fbda1c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit fbda1c2

Browse files
authored
[3.7] Correct CVE-2020-10735 documentation (GH-100306). (GH-100699)
Co-authored-by: Jeremy Paige <ucodery@gmail.com>. (cherry picked from commit 88fe8d7) Co-authored-by: Gregory P. Smith <greg@krypto.org>
1 parent 798260f commit fbda1c2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Doc/library/stdtypes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4751,7 +4751,7 @@ to mitigate denial of service attacks. This limit *only* applies to decimal or
47514751
other non-power-of-two number bases. Hexadecimal, octal, and binary conversions
47524752
are unlimited. The limit can be configured.
47534753

4754-
The :class:`int` type in CPython is an abitrary length number stored in binary
4754+
The :class:`int` type in CPython is an arbitrary length number stored in binary
47554755
form (commonly known as a "bignum"). There exists no algorithm that can convert
47564756
a string to a binary integer or a binary integer to a string in linear time,
47574757
*unless* the base is a power of 2. Even the best known algorithms for base 10
@@ -4815,7 +4815,7 @@ and :class:`str` or :class:`bytes`:
48154815
* ``int(string)`` with default base 10.
48164816
* ``int(string, base)`` for all bases that are not a power of 2.
48174817
* ``str(integer)``.
4818-
* ``repr(integer)``
4818+
* ``repr(integer)``.
48194819
* any other string conversion to base 10, for example ``f"{integer}"``,
48204820
``"{}".format(integer)``, or ``b"%d" % integer``.
48214821

@@ -4843,7 +4843,7 @@ command line flag to configure the limit:
48434843
:envvar:`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`.
48444844
If both the env var and the ``-X`` option are set, the ``-X`` option takes
48454845
precedence. A value of *-1* indicates that both were unset, thus a value of
4846-
:data:`sys.int_info.default_max_str_digits` was used during initilization.
4846+
:data:`sys.int_info.default_max_str_digits` was used during initialization.
48474847

48484848
From code, you can inspect the current limit and set a new one using these
48494849
:mod:`sys` APIs:

Python/clinic/sysmodule.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/sysmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,12 +1223,12 @@ sys_mdebug(PyObject *self, PyObject *args)
12231223
/*[clinic input]
12241224
sys.get_int_max_str_digits
12251225
1226-
Set the maximum string digits limit for non-binary int<->str conversions.
1226+
Return the maximum string digits limit for non-binary int<->str conversions.
12271227
[clinic start generated code]*/
12281228

12291229
static PyObject *
12301230
sys_get_int_max_str_digits_impl(PyObject *module)
1231-/*[clinic end generated code: output=0042f5e8ae0e8631 input=8dab13e2023e60d5]*/
1231+
/*[clinic end generated code: output=0042f5e8ae0e8631 input=61bf9f99bc8b112d]*/
12321232
{
12331233
return PyLong_FromSsize_t(_PyRuntime.int_max_str_digits);
12341234
}

0 commit comments

Comments
 (0)
0