From 1b58f5cbbb757bea043b863e52fc10e6e7dd7f90 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 3 Feb 2016 11:12:23 +0000 Subject: Fix an off-by-one in SocketTest::DecodeHostAndPort 65535 is still a valid port. This should fix the android failures we were getting when we chose to connect over 65535 to the remote lldb-server. llvm-svn: 259638 --- lldb/source/Host/common/Socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Host/common') diff --git a/lldb/source/Host/common/Socket.cpp b/lldb/source/Host/common/Socket.cpp index 91a5e37424e..ea049ae6933 100644 --- a/lldb/source/Host/common/Socket.cpp +++ b/lldb/source/Host/common/Socket.cpp @@ -268,7 +268,7 @@ Socket::DecodeHostAndPort(llvm::StringRef host_and_port, { bool ok = false; port = StringConvert::ToUInt32 (port_str.c_str(), UINT32_MAX, 10, &ok); - if (ok && port < UINT16_MAX) + if (ok && port <= UINT16_MAX) { if (error_ptr) error_ptr->Clear(); -- cgit v1.2.3