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

llvm-svn: 311207
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 0c4df7e..ac475fa 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -815,7 +815,8 @@
         // 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;
             }
           }