Closed
Description
Bug report
Reproduction:
>>> import _sre
>>> _sre.compile('', 0, ['abc'], 0, {}, ())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: regular expression code size limit exceeded
It should be:
>>> import _sre
>>> _sre.compile('', 0, ['abc'], 0, {}, ())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: an integer is required
Because the third arg is code: object(subclass_of='&PyList_Type')
, it is assumed to be integers inside.
Problematic lines:
Lines 1510 to 1515 in def7ea5
They do not check for PyLong_AsUnsignedLong
errors.
I have a PR ready :)