| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Converting between `int` and `str` in bases other than 2
(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) now
raises a `ValueError` if the number of digits in string form is above a
limit to avoid potential denial of service attacks due to the algorithmic
complexity. This is a mitigation for CVE-2020-10735
(https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735).
This new limit can be configured or disabled by environment variable, command
line flag, or :mod:`sys` APIs. See the `Integer String Conversion Length
Limitation` documentation. The default limit is 4300
digits in string form.
Patch by Gregory P. Smith [Google] and Christian Heimes [Red Hat] with feedback
from Victor Stinner, Thomas Wouters, Steve Dower, Ned Deily, and Mark Dickinson.
|
| |
|
|
|
|
|
|
|
| |
(GH-92334)
(cherry picked from commit c908dc5b4798c311981bd7e1f7d92fb623ee448b)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 176835c3d5c70f4c1b152cc2062b549144e37094)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
| |
(cherry picked from commit 1935e1cc284942bec8006287c939e295e1a7bf13)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-31418)
The libexpat 2.4.1 upgrade from introduced the following new exported symbols:
* `testingAccountingGetCountBytesDirect`
* `testingAccountingGetCountBytesIndirect`
* `unsignedCharToPrintable`
* `XML_SetBillionLaughsAttackProtectionActivationThreshold`
* `XML_SetBillionLaughsAttackProtectionMaximumAmplification`
We need to adjust [Modules/expat/pyexpatns.h](https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h)
(The newer libexpat upgrade has no new symbols).
Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 6312c1052c0186b4596fc45c42fd3ade9f8f5911)
Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
|
| |
|
| |
Co-authored-by: Cyril Jouve <jv.cyril@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to get the
fix for the CVE-2013-0340 "Billion Laughs" vulnerability. This copy
is most used on Windows and macOS.
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 3fc5d84046ddbd66abac5b598956ea34605a4e5d)
|
| |
|
|
|
|
|
| |
ctypes param reprs. (GH-24249)
(cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
|
| |
The existing volatile `left`/`right` pointers guarantee that the reads will all occur, but does not guarantee that they will be _used_. So a compiler can still short-circuit the loop, saving e.g. the overhead of doing the xors and especially the overhead of the data dependency between `result` and the reads. That would change performance depending on where the first unequal byte occurs. This change removes that optimization.
(This is change GH-1 from https://bugs.python.org/issue40791 .)
(cherry picked from commit 31729366e2bc09632e78f3896dbce0ae64914f28)
Co-authored-by: Devin Jeanpierre <jeanpierreda@google.com>
|
| |
|
|
|
| |
Note: macOS 11 is not yet released, this release of Python is not
fully supported on 11.0, and not all tests pass.
|
| |
|
|
|
|
| |
Automerge-Triggered-By: @tiran
(cherry picked from commit 4f309abf55f0e6f8950ac13d6ec83c22b8d47bf8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-21389)
(cherry picked from commit aebc0495572c5bb85d2bd97d27cf93ab038b5a6a)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
precisions (GH-20748)
This reverts commit c6f95543b4832c3f0170179da39bcf99b40a7aa8.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix :mod:`ssl`` code to be compatible with OpenSSL 1.1.x builds that use
``no-deprecated`` and ``--api=1.1.0``.
Note: Tests assume full OpenSSL API and fail with limited API.
Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Mark Wright <gienah@gentoo.org>
(cherry picked from commit a871f692b4a2e6c7d45579693e787edc0af1a02c)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
ctypes now raises an ArgumentError when a callback
is invoked with more than 1024 arguments.
The ctypes module allocates arguments on the stack in
ctypes_callproc() using alloca(), which is problematic
when large numbers of arguments are passed. Instead
of a stack overflow, this commit raises an ArgumentError
if more than 1024 parameters are passed.
(cherry picked from commit 29a1384c040d39659e7d01f1fd7b6eb71ef2634e)
Co-authored-by: Sean Gillespie <sean@swgillespie.me>
|
| |
|
|
|
|
|
| |
sequences (GH-16832)
(cherry picked from commit 372ee27d4958302dac7ad6a8711f6fd04771b2e6)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-20419)
struct.error is now raised if there is a null character in a struct
format string.
(cherry picked from commit 3f59b55316f4c6ab451997902579aa69020b537c)
(cherry picked from commit 5ff5edfef63b3dbc1abb004b3fa4b3db87e79ff9)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 7f21c9ac872acc2114aee3313d132b016550ff42)
Co-authored-by: Minmin Gong <gongminmin@msn.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This fixes a possible memory leak in the C implementation of
asyncio.Task.
(cherry picked from commit d2c349b190bcba21a4a38e6520a48ad97a9f1529)
Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
|
| |
|
|
|
|
|
|
| |
Fix the Windows implementation of os.waitpid() for exit code
larger than "INT_MAX >> 8". The exit status is now interpreted as an
unsigned number.
(cherry picked from commit b07350901cac9197aef41855d8a4d56533636b91)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
| |
(GH-19584)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
(cherry picked from commit 12446e6a605f066d837d3a595d0a73e4f3b43b65)
|
| |
|
|
|
| |
_elementtree.XMLParser object (GH-3997) (GH-19487)
(cherry picked from commit 402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527)
|
| |
|
|
|
|
|
| |
(GH-18969)
(cherry picked from commit 472fc843ca816d65c12f9508ac762ca492165c45)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix os.getgrouplist(): if getgrouplist() function fails because the
group list is too small, retry with a larger group list.
On failure, the glibc implementation of getgrouplist() sets ngroups
to the total number of groups. For other implementations, double the
group list size.
(cherry picked from commit f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
| |
On macOS, getgrouplist() returns a non-zero value without setting
errno if the group list is too small. Double the list size and call
it again in this case.
(cherry picked from commit 8ec7370c89aa522602eb9604086ce9f09770953d)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-9516) (GH-19111)
* bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS
This changeset removes the environment varialbe "__PYVENV_LAUNCHER__"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.
Leaving the environment variable present may lead to misbehaviour when
launching other scripts.
* Actually commit the changes for issue 22490...
* Correct typo
Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
* Run make patchcheck
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>.
(cherry picked from commit 044cf94f610e831464a69a8e713dad89878824ce)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
| |
|
|
|
|
| |
is set. (GH-18942). (GH-19104)
(cherry picked from commit b146568dfcbcd7409c724f8917e4f77433dd56e4)
|
| |
|
|
|
|
|
| |
(GH-18412)
(cherry picked from commit b81f40f0adae3b1d1e57f9a89940ba827b9ede70)
Co-authored-by: David CARLIER <devnexen@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-18806) (GH-18990)
In math_2(), the first PyFloat_AsDouble() call should be checked
for failure before the second call.
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>.
(cherry picked from commit 5208b4b37953a406db0ed6a9db545c2948dde989)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
| |
is called with invalid base. (GH-18863). (GH-18955)
(cherry picked from commit e5ccc94bbb153431698b2391df625e8d47a93276)
|
| |
|
|
|
| |
(cherry picked from commit 88944a44aa84b0f3674939019b1befbc7a9dc874)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 1f577ce363121d590b51abf5c41d1bcf3d751436)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
|
|
| |
* bpo-39794: Add --without-decimal-contextvar (#18702)
(cherry picked from commit 815280eb160af637e1347213659f9236adf78f80)
|
| |
|
|
|
|
|
|
|
|
| |
(GH-18131) (#18134)
https://bugs.python.org/issue39427
Automerge-Triggered-By: @pablogsal.
(cherry picked from commit 41f0ef6abbd304409c55612a08788cdd59fbc8a3)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
| |
(#18585)
(cherry picked from commit 90930e65455f60216f09d175586139242dbba260)
Authored-by: Stefan Krah <skrah@bytereef.org>
|
| |
|
|
|
|
|
|
| |
(cherry picked from commit c0cb8beb389da3ba67ad31b1ecc95e100b6292ab)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-18569) (#18575)
(cherry picked from commit 1246d892038a693304549f8574e6c2784b91589a)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
| |
|
|
|
|
|
|
| |
(cherry picked from commit 9b833e00e447a3b8b6966686bff701f549c66263)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When called on a closed object, readinto() segfaults on account
of a write to a freed buffer:
==220553== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==220553== Access not within mapped region at address 0x2A
==220553== at 0x48408A0: memmove (vg_replace_strmem.c:1272)
==220553== by 0x58DB0C: _buffered_readinto_generic (bufferedio.c:972)
==220553== by 0x58DCBA: _io__Buffered_readinto_impl (bufferedio.c:1053)
==220553== by 0x58DCBA: _io__Buffered_readinto (bufferedio.c.h:253)
Reproducer:
reader = open ("/dev/zero", "rb")
_void = reader.read (42)
reader.close ()
reader.readinto (bytearray (42)) GH-GH-GH- BANG!
The problem exists since 2012 when commit dc469454ec added code
to free the read buffer on close().
Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
(cherry picked from commit cb1c0746f277052e45a60d6c436a765e34722821)
Co-authored-by: Philipp Gesang <phg@phi-gamma.net>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-18118)
* bpo-39421: Fix posible crash in heapq with custom comparison operators
* fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
* fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
(cherry picked from commit 79f89e6e5a659846d1068e8b1bd8e491ccdef861)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-17960) (GH-17970)
Although the underlying libffi issue remains open, adding these
checks have caused problems in third-party projects which are in
widespread use. See the issue for examples.
The corresponding tests have also been skipped.
(cherry picked from commit c12440c371025bea9c3bfb94945f006c486c2c01)
|
| |
|
|
| |
Co-Authored-By: Victor Stinner <vstinner@python.org>
(cherry picked from commit 95826c773a9004fc5b3c89de55f800504685ab21)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_openssl_version now accepts version 3.0.0.
getpeercert() no longer returns IPv6 addresses with a trailing new line.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38820
(cherry picked from commit 2b7de6696bf2f924cd2cd9ff0a539c8aa37c6244)
Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38820
Automerge-Triggered-By: @tiran
|
| |
|
|
|
|
|
| |
Python version (GH-17484) (GH-17494)
(cherry picked from commit 969ae7aca809a8dacafee04c261110eea0ac1945)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
|
|
| |
Use the "volatile" keyword to prevent tail call optimization
on any compiler, rather than relying on compiler specific pragma.
(cherry picked from commit 8b787964e0a647caa0558b7c29ae501470d727d9)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
| |
Increment properly Py_True/Py_False reference counter for
_testcapi.WITH_PYMALLOC variable.
(cherry picked from commit 84c36c152a2bdf98f9cc7ce0e1db98e1f442a05e)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
| |
(GH-17097) (GH-17224)
(cherry picked from commit 106271568c58cfebae58f0c52b640dbe716ba2ce)
|
| |
|
|
|
| |
(cherry picked from commit d51a363a4379385fdfe9c09a56324631465ede29)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|