diff options
author | George Hu <huyubohyb@gmail.com> | 2022-09-20 10:56:16 -0700 |
---|---|---|
committer | George Hu <huyubohyb@gmail.com> | 2022-09-20 12:17:32 -0700 |
commit | 3ae633766b57717522644ef44c5602a9a6402ee6 (patch) | |
tree | 3370a91f84bb801c194a10fe1d50b325752d2d51 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | 6257832bf94fbd83836ee3616480d815a1fdfbf3 (diff) | |
download | llvm-3ae633766b57717522644ef44c5602a9a6402ee6.zip llvm-3ae633766b57717522644ef44c5602a9a6402ee6.tar.gz llvm-3ae633766b57717522644ef44c5602a9a6402ee6.tar.bz2 |
[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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Status> accept_status = std::async( std::launch::async, [&] { return listen_socket.Accept(accept_socket); }); |