| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
structs/unions. (GH-16589) (GH-16672)
(cherry picked from commit e8bedbddadaa86be6bd86dc32dbdbd53933a4988)
|
| |
|
|
|
|
| |
Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes..
(cherry picked from commit 52b940803860e37bcc3f6096b2d24e7c20a0e807)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
| |
(GH-16381) (GH-16400)
(cherry picked from commit c64af8fad3c4f5751af624647fbb0ce023f525dc)
|
| |
|
|
|
| |
(GH-15839) (GH-16369)
(cherry picked from commit 12f209eccb1587e8c98057d9c5f865c21f4a16c1)
|
| |
|
|
|
|
|
| |
(GH-16190)
(cherry picked from commit f669581a9527afb0d2325f9845a86715c0ba365d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 8debfa50407107ff2329d01081cdc12d359f1d12)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-16140) (GH-16200)
``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``.
https://bugs.python.org/issue33936
(cherry picked from commit 724f1a57231f9287c37255adf0e4364d12cf693d)
Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue33936
Automerge-Triggered-By: @tiran
|
| |
|
|
|
|
|
|
|
|
| |
(GH-16136) (GH-16175)
(cherry picked from commit 56a45142e70a1ccf3233d43cb60c47255252e89a)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
Automerge-Triggered-By: @zhangyangyu
|
| |
|
|
|
|
|
|
|
|
| |
* 1. add test case with wrong behavior
* 2. fix bug when max_length == -1
* 3. allow b"" as valid input data for decompress_buf()
* 4. when max_length >= 0, let needs_input mechanism works
* add more asserts to test case
(cherry picked from commit 4ffd05d7ec47cfd0d7fc95dce851633be9663255)
Co-authored-by: animalize <animalize@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
failure. (GH-16011)
An exception may occur during a PyObject_IsSubclass() call.
(cherry picked from commit ea683deccc505a78bbbb1eb8c6a88b0835ad5151)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
| |
As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called
before Py_Initialize() function.
(cherry picked from commit 9e61066355b4b55c873d56f5f106a22463b56862)
Co-authored-by: Kenta Murata <mrkn@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
|
|
| |
Accumulate certificates in a set instead of doing a costly list contain
operation. A Windows cert store can easily contain over hundred
certificates. The old code would result in way over 5,000 comparison
operations
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 09090d04ef8d2f4c94157b852d3d530a51e13d22)
Co-authored-by: Orivej Desh <orivej@gmx.fr>
|
| |
|
|
|
|
|
|
| |
ssl_collect_certificates function in _ssl.c has a memory leak.
Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2.
But CertCloseStore() is called only once and the refcnt leaves 1.
(cherry picked from commit ed70129e15ea028469145111044a4349960a4e6f)
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(GH-14462)
If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a6563650c835d50f7302971a5b145e94f9d0dc68)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
| |
RuntimeError is now raised in this case.
(cherry picked from commit 526a01467b3277f9fcf7f91e66c23321caa1245d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
This is a complement to PR 13375.
(cherry picked from commit 3c87a667bb367ace1de6bd1577fdb4f66947da52)
Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
|
| |
|
|
|
|
|
| |
seconds>=24. (GH-14307)
(cherry picked from commit 122376df550b71dd3bec0513c7483cc1714212fa)
Co-authored-by: Justin Blanchard <UncombedCoconut@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 8bf5fef8737fdd12724b9340d76a4ed391c4ad8a)
Co-authored-by: vrajivk <3413293+vrajivk@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-15390) (GH-15417)
https://bugs.python.org/issue37915
Automerge-Triggered-By: @pablogsal.
(cherry picked from commit 4be11c009abe88175fa164b45e4838e7267dfa97)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes an inconsistency between the Python and C implementations of
the datetime module. The pure python version of the code was not
accepting offsets greater than 23:59 but less than 24:00. This is an
accidental legacy of the original implementation, which was put in place
before tzinfo allowed sub-minute time zone offsets.
GH-14878
(cherry picked from commit 92c7e30adf5c81a54d6e5e555a6bdfaa60157a0d)
|
| |
|
|
|
|
|
|
|
|
| |
PEM_read_bio_X509 (GH-15303)
X509_AUX is an odd, note widely used, OpenSSL extension to the X509 file format. This function doesn't actually use any of the extra metadata that it parses, so just use the standard API.
Automerge-Triggered-By: @tiran
(cherry picked from commit 40dad9545aad4ede89abbab1c1beef5303d9573e)
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
faulthandler now allocates a dedicated stack of SIGSTKSZ*2 bytes,
instead of just SIGSTKSZ bytes. Calling the previous signal handler
in faulthandler signal handler uses more than SIGSTKSZ bytes of stack
memory on some platforms.
(cherry picked from commit ac827edc493d3ac3f5b9b0cc353df1d4b418a9aa)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD implementation of poll(2) restricts the timeout argument to be
either zero, or positive, or equal to INFTIM (-1).
Unless otherwise overridden, socket timeout defaults to -1. This value
is then converted to milliseconds (-1000) and used as argument to the
poll syscall. poll returns EINVAL (22), and the connection fails.
This bug was discovered during the EINTR handling testing, and the
reproduction code can be found in
https://bugs.python.org/issue23618 (see connect_eintr.py,
attached). On GNU/Linux, the example runs as expected.
This change is trivial:
If the supplied timeout value is negative, truncate it to -1.
(cherry picked from commit 28146206578ebe1b84b48e6f255738a227058c04)
Co-authored-by: Artem Khramov <akhramov@pm.me>
|
| |
|
|
|
|
|
| |
Fix the implementation of curses addch(str, color_pair): pass the
color pair to setcchar(), instead of always passing 0 as the color
pair.
(cherry picked from commit 077af8c2c93dd71086e2c5e5ff1e634b6da8f214)
|
| |
|
|
|
|
|
|
|
|
| |
datetime.timezone. (GH-14996) (GH-15104)
There was a discrepancy between the Python and C implementations.
Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.
(cherry picked from commit 17e52649c0e7e9389f1cc2444a53f059e24e6bca)
|
| |
|
|
|
| |
(cherry picked from commit c9345e382c630ddcc2b148b30954640e0e435c8a)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
| |
|
|
|
| |
(cherry picked from commit 96e12d5f4f3c5a20986566038ee763dff3c228a1)
Co-authored-by: Min ho Kim <minho42@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 2cd07920bb7d2d319999394092190f37935dc421)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SSLContext.post_handshake_auth = True no longer sets
SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the
option is documented as ignored for clients, OpenSSL implicitly enables cert
chain validation when the flag is set.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37428
(cherry picked from commit f0f5930ac88482ef896283db5be9b8d508d077db)
Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37428
|
| |
|
|
|
| |
(cherry picked from commit 3b03b09fc94425915c5b1225e9200a3a95bc827b)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
| |
(GH-14414)
(cherry picked from commit 45a30af109f69a81576b87ea775863ba12d55316)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-11751)
(cherry picked from commit 6ffd9b05dfade9e3a101fe039157856eb855f82e)
Co-authored-by: ziheng <zihenglv@gmail.com>
|
| |
|
|
|
|
| |
'\0' is the NUL byte not NULL.
(cherry picked from commit 7821b4c6d29933511d50bb42255e39790c6abf00)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-13073)
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].
This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.
In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7
@zooba
https://bugs.python.org/issue36779
(cherry picked from commit b4c7defe58695a6670a8fdeaef67a638bbb47e42)
Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 8725c83ed5ca8959195ad8326db99d564a921749)
Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(GH-11859)
Escape ``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) in Unicode strings.
(cherry picked from commit 38ab7d4721b422547f7b46b9d68968863fa70573)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
* bpo-29505: Enable fuzz testing of the json module, enforce size limit on int(x) fuzz and json input size to avoid timeouts.
Contributed by by Ammar Askar for Google.
(cherry picked from commit a6e190e94b47324f14e22a09200c68b722d55699)
Co-authored-by: Ammar Askar <aaskar@google.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
of pyexpat line in Setup. (GH-13064)
When the line is uncommented, the equals character causes it to be incorrectly interpreted
as a macro definition by makesetup. This results in invalid Makefile output.
The expat code only requires XML_POOR_ENTROPY to be defined; the value is unnecessary.
(cherry picked from commit 408a2ef1aceff1f4270c44552fa39ef93d9283e3)
Co-authored-by: aaronpaulhurst <aaronpaulhurst@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit a15a7bcaea54e1845ab2abe27e6f583294cd715b)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
| |
|
|
|
|
|
| |
(GH-13860) (GH-13896)
(cherry picked from commit dc2476500d91082f0c907772c83a044bf49af279)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| | |
|
| |
|
|
|
|
| |
bytesio_sizeof() must check if an error has occurred in _PySys_GetSizeOf().
(cherry picked from commit 36dcaab7fde5d2e54cdeff5b705b5adcb27726dd)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 6236c9823ef3e8e2229b0598d3d8189adf5e00f2)
Co-authored-by: Xi Ruoyao <xry111@mengyan1223.wang>
|
| |
|
|
|
|
|
|
| |
handled (GH-7778)
``_thread.interrupt_main()`` now avoids setting the Python error status if the ``SIGINT`` signal is ignored or not handled by Python.
(cherry picked from commit 608876b6b1eb59538e6c29671a733033fb8b5be7)
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
|
| |
|
|
|
|
|
|
| |
(GH-13421) (GH-13471)
Include windows.h rather than crtdbg.h to get STATUS_CONTROL_C_EXIT constant.
Moreover, include windows.h on Windows, not only when MSC is used.
(cherry picked from commit 925af1d99b69bf3e229411022ad840c5a0cfdcf8)
|
| |
|
|
|
|
|
| |
Makes the documentation of math and cmath module
more helpful for the beginners.
(cherry picked from commit 6faad355db6c2bd4a0ade7868f245b42c04f5337)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
| |
|
|
|
|
|
|
|
|
| |
The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.
Co-Authored-By: Martin Panter <vadmium+py@gmail.com>
(cherry picked from commit 14514d9084a40f599c57da853a305aa264562a43)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| | |
|