summaryrefslogtreecommitdiffstats
path: root/Python/codegen.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2025-01-27 13:44:00 (GMT)
committerGitHub <noreply@github.com>2025-01-27 13:44:00 (GMT)
commit735f25c5e3a0f74438c86468ec4dfbe219d93c91 (patch)
treee505d0187e85ad52e3501eb77295cc502ce69fd3 /Python/codegen.c
parent3fb5f6eb9b2b966142b576610210d2b491c1eebb (diff)
downloadcpython-735f25c5e3a0f74438c86468ec4dfbe219d93c91.zip
cpython-735f25c5e3a0f74438c86468ec4dfbe219d93c91.tar.gz
cpython-735f25c5e3a0f74438c86468ec4dfbe219d93c91.tar.bz2
gh-119511: Fix a potential denial of service in imaplib (#119514)
The IMAP4 client could consume an arbitrary amount of memory when trying to connect to a malicious server, because it read a "literal" data with a single read(size) call, and BufferedReader.read() allocates the bytes object of the specified size before reading. Now the IMAP4 client reads data by chunks, therefore the amount of used memory is limited by the amount of the data actually been sent by the server. Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Python/codegen.c')
0 files changed, 0 insertions, 0 deletions