Skip to content

Commit c77b0ce

Browse files
authored
[3.10] gh-95778: add doc missing in some places (GH-100627). (#101065)
(cherry picked from commit 4652182) Co-authored-by: Éric <earaujo@caravan.coop>
1 parent 6919c36 commit c77b0ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Misc/python.man

+9
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ Set implementation specific option. The following options are available:
318318

319319
-X warn_default_encoding: enable opt-in EncodingWarning for 'encoding=None'
320320

321+
-X int_max_str_digits=number: limit the size of int<->str conversions.
322+
This helps avoid denial of service attacks when parsing untrusted data.
323+
The default is sys.int_info.default_max_str_digits. 0 disables.
324+
321325
.TP
322326
.B \-x
323327
Skip the first line of the source. This is intended for a DOS
@@ -487,6 +491,11 @@ values.
487491

488492
The integer must be a decimal number in the range [0,4294967295]. Specifying
489493
the value 0 will disable hash randomization.
494+
.IP PYTHONINTMAXSTRDIGITS
495+
Limit the maximum digit characters in an int value
496+
when converting from a string and when converting an int back to a str.
497+
A value of 0 disables the limit. Conversions to or from bases 2, 4, 8,
498+
16, and 32 are never limited.
490499
.IP PYTHONMALLOC
491500
Set the Python memory allocators and/or install debug hooks. The available
492501
memory allocators are

0 commit comments

Comments
 (0)