[Python-checkins] [3.7] gh-95778: add doc missing in some places (GH-100627) (GH-101631)

ned-deily webhook-mailer at python.org
Tue Feb 7 10:21:21 EST 2023


https://github.com/python/cpython/commit/ecfed4f9cc711b6843f6b0fc46b241ba0d3fd0d1
commit: ecfed4f9cc711b6843f6b0fc46b241ba0d3fd0d1
branch: 3.7
author: Éric <earaujo at caravan.coop>
committer: ned-deily <nad at python.org>
date: 2023-02-07T10:21:12-05:00
summary:

[3.7] gh-95778: add doc missing in some places (GH-100627) (GH-101631)

(cherry picked from commit 46521826cb1883e29e4640f94089dd92c57efc5b)

files:
M Misc/python.man

diff --git a/Misc/python.man b/Misc/python.man
index 67a5bb4cf849..8803f8452552 100644
--- a/Misc/python.man
+++ b/Misc/python.man
@@ -309,6 +309,10 @@ Set implementation specific option. The following options are available:
         locale-aware mode. -X utf8=0 explicitly disables UTF-8 mode (even when it would
         otherwise activate automatically). See PYTHONUTF8 for more details
 
+    -X int_max_str_digits=number: limit the size of int<->str conversions.
+       This helps avoid denial of service attacks when parsing untrusted data.
+       The default is sys.int_info.default_max_str_digits.  0 disables.
+
 .TP
 .B \-x
 Skip the first line of the source.  This is intended for a DOS
@@ -476,6 +480,11 @@ values.
 
 The integer must be a decimal number in the range [0,4294967295].  Specifying
 the value 0 will disable hash randomization.
+.IP PYTHONINTMAXSTRDIGITS
+Limit the maximum digit characters in an int value
+when converting from a string and when converting an int back to a str.
+A value of 0 disables the limit.  Conversions to or from bases 2, 4, 8,
+16, and 32 are never limited.
 .IP PYTHONMALLOC
 Set the Python memory allocators and/or install debug hooks. The available
 memory allocators are



More information about the Python-checkins mailing list