Skip to content

Commit 41b0aa2

Browse files
committed
fix docs
1 parent c13d940 commit 41b0aa2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/library/pyexpat.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,16 @@ XMLParser Objects
238238
.. versionadded:: 3.13
239239

240240

241-
:class:`!xmlparser` objects have the following methods to mitigate some
242-
common XML vulnerabilities.
241+
:class:`!xmlparser` objects have the following methods to tune protections
242+
against some common XML vulnerabilities.
243243

244244
.. method:: xmlparser.SetAllocTrackerActivationThreshold(threshold, /)
245245

246246
Sets the number of allocated bytes of dynamic memory needed to activate
247247
protection against disproportionate use of RAM.
248248

249-
By default, parser objects have an allocation activation threshold of 64 MiB,
250-
or equivalently 67,108,864 bytes.
249+
Parser objects usually have an allocation activation threshold of 64 MiB,
250+
but the actual default value depends on the underlying Expat library.
251251

252252
An :exc:`ExpatError` is raised if this method is called on a
253253
|xml-non-root-parser| parser.
@@ -271,7 +271,8 @@ common XML vulnerabilities.
271271
near the start of parsing even with benign files in practice. In particular,
272272
the activation threshold should be carefully chosen to avoid false positives.
273273

274-
By default, parser objects have a maximum amplification factor of 100.0.
274+
Parser objects usually have a maximum amplification factor of 100,
275+
but the actual default value depends on the underlying Expat library.
275276

276277
An :exc:`ExpatError` is raised if this method is called on a
277278
|xml-non-root-parser| parser or if *max_factor* is outside the valid range.

0 commit comments

Comments
 (0)