[Lldb-commits] [PATCH] D28808: Fix a bug where lldb does not respect the packet size.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 17 09:33:50 PST 2017


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

We need to check stub_max_size to make sure we don't get an integer underflow.



================
Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:3999
+      // time, we take a maximum guess here.
+      stub_max_size -= 32 + 32 + 6;
       m_max_memory_size = stub_max_size;
----------------
You need to check "sub_max_size" here. What if it says 64? We will then use a very large unsigned number UINT64_MAX - 6.


https://reviews.llvm.org/D28808





More information about the lldb-commits mailing list