Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4652182

Browse files
authored
pythongh-95778: add doc missing in some places (pythonGH-100627)
1 parentf4fcfdf commit4652182

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎Misc/python.man‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,10 @@ Set implementation-specific option. The following options are available:
358358
-X frozen_modules=[on|off]: whether or not frozen modules should be used.
359359
The default is "on" (or "off" if you are running a local build).
360360

361+
-X int_max_str_digits=number: limit the size of int<->str conversions.
362+
This helps avoid denial of service attacks when parsing untrusted data.
363+
The default is sys.int_info.default_max_str_digits. 0 disables.
364+
361365
.TP
362366
.B\-x
363367
Skip the first line of the source. This is intended for a DOS
@@ -531,6 +535,11 @@ values.
531535

532536
The integer must be a decimal number in the range [0,4294967295]. Specifying
533537
the value 0 will disable hash randomization.
538+
.IPPYTHONINTMAXSTRDIGITS
539+
Limit the maximum digit characters in an int value
540+
when converting from a string and when converting an int back to a str.
541+
A value of 0 disables the limit. Conversions to or from bases 2, 4, 8,
542+
16, and 32 are never limited.
534543
.IPPYTHONMALLOC
535544
Set the Python memory allocators and/or install debug hooks. The available
536545
memory allocators are

‎Python/initconfig.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ static const char usage_envvars[] =
180180
"PYTHONDEBUG : enable parser debug mode (-d)\n"
181181
"PYTHONDONTWRITEBYTECODE : don't write .pyc files (-B)\n"
182182
"PYTHONINSPECT : inspect interactively after running script (-i)\n"
183+
"PYTHONINTMAXSTRDIGITS : limit max digit characters in an int value\n"
184+
" (-X int_max_str_digits=number)\n"
183185
"PYTHONNOUSERSITE : disable user site directory (-s)\n"
184186
"PYTHONOPTIMIZE : enable level 1 optimizations (-O)\n"
185187
"PYTHONUNBUFFERED : disable stdout/stderr buffering (-u)\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp