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

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