Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
Bug report
Bug description:
There
module's documentation says it only raises there.error
exception, but the regex"\x00(?<!\x00{2147483648})"
causes RuntimeError:
Python3.11.5 (main,Sep202023,10:46:56) [GCC12.2.0]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>importre>>>re.compile("\x00(?<!\x00{2147483647})")re.compile('\x00(?<!\x00{2147483647})')>>>>>>>>>re.compile("\x00(?<!\x00{2147483648})")Traceback (mostrecentcalllast):File"<stdin>",line1,in<module>File"/usr/local/lib/python3.11/re/__init__.py",line227,incompilereturn_compile(pattern,flags)^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/re/__init__.py",line294,in_compilep=_compiler.compile(pattern,flags)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/re/_compiler.py",line759,incompilereturn_sre.compile(^^^^^^^^^^^^^RuntimeError:invalidSREcode
Otherre
methods, such asmatch
orsplit
show the same result.
For brevity:"\x00(?<!\x00{2147483648})"
-> RuntimeError"\x00(?<!\x00{2147483647})"
-> no errors
I have found this with libFuzzer by testing thefuzz_sre_compile
binary.
CPython versions tested on:
3.11
Operating systems tested on:
Linux