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

Skip to content

Commit 860aee7

Browse files
committed
Properly initialize all fields of a SSL object after allocation.
1 parent 5176337 commit 860aee7

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
@@ -71,6 +71,8 @@ Core and Builtins
7171
Library
7272
-------
7373

74+
- Properly initialize all fields of a SSL object after allocation.
75+
7476
- Issue #4366: Fix building extensions on all platforms when --enable-shared
7577
is used.
7678

Modules/_ssl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ newPySSLSocket(SSL_CTX *ctx, PySocketSockObject *sock,
455455
self->peer_cert = NULL;
456456
self->ssl = NULL;
457457
self->Socket = NULL;
458+
self->shutdown_seen_zero = 0;
458459

459460
/* Make sure the SSL error state is initialized */
460461
(void) ERR_get_state();

0 commit comments

Comments
 (0)