Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2201e1

Browse files
committed
Properly initialize all fields of a SSL object after allocation.
2 parents 20b8555 + 860aee7 commit b2201e1

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Core and Builtins
1515
Library
1616
-------
1717

18+
- Properly initialize all fields of a SSL object after allocation.
19+
1820
- Issue #19095: SSLSocket.getpeercert() now raises ValueError when the
1921
SSL handshake hasn't been done.
2022

Modules/_ssl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
486486
self->ssl = NULL;
487487
self->Socket = NULL;
488488
self->ctx = sslctx;
489+
self->shutdown_seen_zero = 0;
489490
self->handshake_done = 0;
490491
Py_INCREF(sslctx);
491492

0 commit comments

Comments
 (0)