Author: jmolenda Date: Fri Aug 18 15:57:59 2017 New Revision: 311207 URL: http://llvm.org/viewvc/llvm-project?rev=311207&view=rev Log: Commiting Christopher Brook's patch for
"Prevent negative chars from being sign-extended into isprint and isspace which take and int and crash if the int is negative" https://reviews.llvm.org/D36620 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=311207&r1=311206&r2=311207&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Fri Aug 18 15:57:59 2017 @@ -815,7 +815,8 @@ GDBRemoteCommunication::CheckForPacket(c // checksum if (m_bytes[0] == '$' && total_length > 4) { for (size_t i = 0; !binary && i < total_length; ++i) { - if (isprint(m_bytes[i]) == 0 && isspace(m_bytes[i]) == 0) { + unsigned char c = m_bytes[i]; + if (isprint(c) == 0 && isspace(c) == 0) { binary = true; } } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits