diff --git a/llarp/ev.hpp b/llarp/ev.hpp index 9caab0050..021385c1b 100644 --- a/llarp/ev.hpp +++ b/llarp/ev.hpp @@ -35,7 +35,7 @@ namespace llarp { llarp_time_t timestamp = 0; size_t bufsz; - byte_t buf[EV_WRITE_BUF_SZ]; + byte_t buf[EV_WRITE_BUF_SZ] = {0}; WriteBuffer() = default; @@ -517,7 +517,7 @@ namespace llarp struct llarp_ev_loop { byte_t readbuf[EV_READ_BUF_SZ] = {0}; - llarp_time_t _now = 0; + llarp_time_t _now = 0; virtual bool init() = 0; diff --git a/llarp/ev_win32.hpp b/llarp/ev_win32.hpp index fcf9b8a16..8b20f7d75 100644 --- a/llarp/ev_win32.hpp +++ b/llarp/ev_win32.hpp @@ -16,7 +16,7 @@ namespace llarp if(_shouldClose) return -1; - WSABUF r_buf = {sz, buf}; + WSABUF r_buf = {sz, (char*)buf}; DWORD amount = 0; WSARecv(std::get< SOCKET >(fd), &r_buf, 1, nullptr, 0, &portfd[0], nullptr); @@ -39,7 +39,7 @@ namespace llarp ssize_t tcp_conn::do_write(void* buf, size_t sz) { - WSABUF s_buf = {sz, buf}; + WSABUF s_buf = {sz, (char*)buf}; DWORD sent = 0; if(_shouldClose)