mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #13169: The maximal repetition number in a regular expression has been
increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on 64-bit).
This commit is contained in:
commit
a0eb809995
7 changed files with 62 additions and 13 deletions
|
|
@ -16,6 +16,11 @@
|
|||
/* size of a code word (must be unsigned short or larger, and
|
||||
large enough to hold a UCS4 character) */
|
||||
#define SRE_CODE Py_UCS4
|
||||
#if SIZEOF_SIZE_T > 4
|
||||
# define SRE_MAXREPEAT (~(SRE_CODE)0)
|
||||
#else
|
||||
# define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX + 1u)
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
PyObject_VAR_HEAD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue