From: Antoine Pitrou Date: Sun, 29 Sep 2013 17:52:45 +0000 (+0200) Subject: Properly initialize all fields of a SSL object after allocation. X-Git-Tag: v2.7.6rc1~130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87c99a0d37e31d79066c4f5741dc8f1cb5972251;p=python Properly initialize all fields of a SSL object after allocation. --- diff --git a/Misc/NEWS b/Misc/NEWS index 2984b57e43..af6ed7e96c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -32,6 +32,8 @@ Core and Builtins Library ------- +- Properly initialize all fields of a SSL object after allocation. + - Issue #4366: Fix building extensions on all platforms when --enable-shared is used. diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 9164a65201..d95568cf16 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -286,6 +286,7 @@ newPySSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file, self->ssl = NULL; self->ctx = NULL; self->Socket = NULL; + self->shutdown_seen_zero = 0; /* Make sure the SSL error state is initialized */ (void) ERR_get_state();