[Python-checkins] cpython (3.3): Properly initialize all fields of a SSL object after allocation.

antoine.pitrou python-checkins at python.org
Sun Sep 29 19:54:29 CEST 2013


http://hg.python.org/cpython/rev/e27c767b8d4f
changeset:   85858:e27c767b8d4f
branch:      3.3
parent:      85855:b602edf9b100
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sun Sep 29 19:52:45 2013 +0200
summary:
  Properly initialize all fields of a SSL object after allocation.

files:
  Misc/NEWS      |  2 ++
  Modules/_ssl.c |  1 +
  2 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -71,6 +71,8 @@
 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
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -455,6 +455,7 @@
     self->peer_cert = NULL;
     self->ssl = NULL;
     self->Socket = NULL;
+    self->shutdown_seen_zero = 0;
 
     /* Make sure the SSL error state is initialized */
     (void) ERR_get_state();

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list