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

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


http://hg.python.org/cpython/rev/2b1f1a42d1e1
changeset:   85859:2b1f1a42d1e1
parent:      85857:ddcdf7f7eac8
parent:      85858:e27c767b8d4f
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sun Sep 29 19:53: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
@@ -15,6 +15,8 @@
 Library
 -------
 
+- Properly initialize all fields of a SSL object after allocation.
+
 - Issue #19095: SSLSocket.getpeercert() now raises ValueError when the
   SSL handshake hasn't been done.
 
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -486,6 +486,7 @@
     self->ssl = NULL;
     self->Socket = NULL;
     self->ctx = sslctx;
+    self->shutdown_seen_zero = 0;
     self->handshake_done = 0;
     Py_INCREF(sslctx);
 

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


More information about the Python-checkins mailing list