Clear connection options and status fields in free_connection_partially().
Most fields should be zero when reusing a connection. In particular, when an outgoing connection to a node which is reachable on more than one address is made, the second connection to that node will have status.encryptout set but outctx will be NULL, causing a NULL pointer dereference when EVP_EncryptUpdate() is called in send_meta() when it shouldn't.
This commit is contained in:
parent
ef9358c0d6
commit
86116bb022
2 changed files with 13 additions and 1 deletions
|
@ -38,7 +38,7 @@ typedef struct connection_status_t {
|
|||
unsigned int pinged:1; /* sent ping */
|
||||
unsigned int active:1; /* 1 if active.. */
|
||||
unsigned int connecting:1; /* 1 if we are waiting for a non-blocking connect() to finish */
|
||||
unsigned int termreq:1; /* the termination of this connection was requested */
|
||||
unsigned int unused_termreq:1; /* the termination of this connection was requested */
|
||||
unsigned int remove_unused:1; /* Set to 1 if you want this connection removed */
|
||||
unsigned int timeout_unused:1; /* 1 if gotten timeout */
|
||||
unsigned int encryptout:1; /* 1 if we can encrypt outgoing traffic */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue