]> granicus.if.org Git - python/commit
[3.5] bpo-30594: Fixed refcounting in newPySSLSocket (GH-1992) (#1993)
authorNathaniel J. Smith <njs@pobox.com>
Thu, 8 Jun 2017 11:14:44 +0000 (04:14 -0700)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 8 Jun 2017 11:14:44 +0000 (14:14 +0300)
commit54ba41ecc5711f89841342c5f9dd555ee13404b5
treecef59d99b7deacfcb9679201e35fcb731d436fb6
parente3a0ce2edea8082c8ae74ae03e04ce5dd1b52de4
[3.5] bpo-30594: Fixed refcounting in newPySSLSocket (GH-1992) (#1993)

If pass a server_hostname= that fails IDNA decoding to SSLContext.wrap_socket or SSLContext.wrap_bio, then the SSLContext object had a spurious Py_DECREF called on it, eventually leading to segfaults.
(cherry picked from commit 65ece7ca2366308fa91a39a8dfa255e6bdce3cca)
Modules/_ssl.c