[Lldb-commits] [lldb] r242119 - Fix off-by-one error in the packet decompression routine

Jason Molenda jmolenda at apple.com
Mon Jul 13 21:51:05 PDT 2015


Author: jmolenda
Date: Mon Jul 13 23:51:05 2015
New Revision: 242119

URL: http://llvm.org/viewvc/llvm-project?rev=242119&view=rev
Log:
Fix off-by-one error in the packet decompression routine
that would not pass through empty ("unsupported packet") replies
correctly.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=242119&r1=242118&r2=242119&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Mon Jul 13 23:51:05 2015
@@ -564,7 +564,7 @@ GDBRemoteCommunication::DecompressPacket
         return true;
 
     size_t pkt_size = m_bytes.size();
-    if (pkt_size < 6)
+    if (pkt_size < 5)
         return true;
     if (m_bytes[0] != '$' && m_bytes[0] != '%')
         return true;





More information about the lldb-commits mailing list