================
@@ -3433,8 +3433,40 @@ bool GDBRemoteCommunicationClient::CalculateMD5(
return false;
if (response.Peek() && *response.Peek() == 'x')
return false;
- low = response.GetHexMaxU64(false, UINT64_MAX);
- high = response.GetHexMaxU64(false, UINT64_MAX);
+
+ // GDBRemoteCommunicationServerCommon::Handle_vFile_MD5 concatenates low
and
+ // high hex strings. We can't use response.GetHexMaxU64 because that can't
+ // handle the concatenated hex string. What would happen is parsing the low
+ // would consume the whole response packet - which is a bug. Instead, we
get
----------------
Awfa wrote:
`response.GetHexMaxU64` consumes the response stream until a non-valid hex
character is encountered.
This is just the wrong function to use because the server returns both the
low/high parts concatenated. When it was used, what would happen is `low =
response.GetHexMaxU64...` would consume the whole packet, when it should just
be consuming the first half of it. This also leads to `high` being set to 0
because `low` consumed the entire packet.
This part of the patch isn't a workaround, it's the fix. This fixes the client
so it can correctly parse the server's response.
https://github.com/llvm/llvm-project/pull/88812
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits