Bug report
Bug description:
Found by OSS Fuzz in #501627726.
A simplified reproducer:
import time
import configparser
for N in (5000, 10000, 20000, 40000):
s = '[*]\n' + '=\n' * N
p = configparser.ConfigParser(strict=False)
t0 = time.perf_counter()
try:
p.read_string(s)
except configparser.ParsingError:
pass
print(f'{N}: {time.perf_counter() - t0}s')
produces:
5000: 0.5495022920076735s
10000: 2.0415573030040832s
20000: 7.589155077002943s
40000: 30.856201829999918s
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Bug report
Bug description:
Found by OSS Fuzz in #501627726.
A simplified reproducer:
produces:
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response