diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-07-21 15:55:09 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-08-13 23:56:14 -0700 |
| commit | b7298cf2395e7113634444f7eaabed32a4dac08a (patch) | |
| tree | 8153ba5a6cc366d6f7502a1a93aa8efa70a8bbd3 /src/platform/windows/win_tcp.h | |
| parent | d3652db599cb3bf4101cf2e6cf42c764d65b6fb8 (diff) | |
| download | nng-b7298cf2395e7113634444f7eaabed32a4dac08a.tar.gz nng-b7298cf2395e7113634444f7eaabed32a4dac08a.tar.bz2 nng-b7298cf2395e7113634444f7eaabed32a4dac08a.zip | |
fixes #1837 IPC - Use After Free
This fixes a problem only found on Windows, that affected both IPC and TCP.
Diffstat (limited to 'src/platform/windows/win_tcp.h')
| -rw-r--r-- | src/platform/windows/win_tcp.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/platform/windows/win_tcp.h b/src/platform/windows/win_tcp.h index e54f853c..d151b9a3 100644 --- a/src/platform/windows/win_tcp.h +++ b/src/platform/windows/win_tcp.h @@ -1,5 +1,5 @@ // -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // Copyright 2019 Devolutions <info@devolutions.net> // @@ -24,16 +24,18 @@ struct nni_tcp_conn { nni_win_io conn_io; nni_list recv_aios; nni_list send_aios; - nni_aio * conn_aio; + nni_aio *conn_aio; SOCKADDR_STORAGE sockname; SOCKADDR_STORAGE peername; - nni_tcp_dialer * dialer; + nni_tcp_dialer *dialer; nni_tcp_listener *listener; int recv_rv; int send_rv; int conn_rv; bool closed; char buf[512]; // to hold acceptex results + bool sending; + bool recving; nni_mtx mtx; nni_cv cv; }; |
