From 3ae633766b57717522644ef44c5602a9a6402ee6 Mon Sep 17 00:00:00 2001 From: George Hu Date: Tue, 20 Sep 2022 10:56:16 -0700 Subject: [PATCH] [LLDB]Initialize accept_socket with nullptr Fix high impact issue of illegal access of memory. Initialize accept_socket with nullptr. Differential Revision: https://reviews.llvm.org/D134293 --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 745e3363..b67cd7e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -1233,7 +1233,7 @@ GDBRemoteCommunication::ConnectLocally(GDBRemoteCommunication &client, listen_socket.Listen("localhost:0", backlog).ToError()) return error; - Socket *accept_socket; + Socket *accept_socket = nullptr; std::future accept_status = std::async( std::launch::async, [&] { return listen_socket.Accept(accept_socket); }); -- 2.7.4