[Lldb-commits] [PATCH] D134293: [LLDB]Initialize accept_socket with nullptr
Yubo Hu via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 20 10:59:30 PDT 2022
GeorgeHuyubo created this revision.
Herald added a project: All.
GeorgeHuyubo requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Fix high impact issue of illegal access of memory.
Initialize accept_socket with nullptr.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134293
Files:
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -1233,7 +1233,7 @@
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); });
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134293.461621.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220920/dea45f1e/attachment.bin>
More information about the lldb-commits
mailing list