mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-10 15:38:08 +01:00
rpcn_client: Misc fixes
Fix missing freeaddrinfo Fix wrong return value in a rpcn_client::connect() path Fix missing 0 presence validation in vec_stream::get_string()
This commit is contained in:
parent
2064bd87e3
commit
53dcf2ba00
|
|
@ -896,7 +896,7 @@ namespace rpcn
|
|||
return error_and_disconnect("Failed to send all the bytes");
|
||||
}
|
||||
|
||||
res = 0;
|
||||
continue;
|
||||
}
|
||||
n_sent += res;
|
||||
}
|
||||
|
|
@ -1055,6 +1055,8 @@ namespace rpcn
|
|||
found = found->ai_next;
|
||||
}
|
||||
|
||||
freeaddrinfo(addr_info);
|
||||
|
||||
if (!found_ipv4)
|
||||
{
|
||||
rpcn_log.error("connect: Failed to find IPv4 for %s", host);
|
||||
|
|
@ -1156,7 +1158,7 @@ namespace rpcn
|
|||
if (!connected || terminate)
|
||||
{
|
||||
state = rpcn_state::failure_other;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (received_version != RPCN_PROTOCOL_VERSION)
|
||||
|
|
|
|||
|
|
@ -79,6 +79,14 @@ public:
|
|||
res.push_back(vec[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
// Make sure we hit terminating 0
|
||||
if (i >= vec.size())
|
||||
{
|
||||
error = true;
|
||||
return {};
|
||||
}
|
||||
|
||||
i++;
|
||||
|
||||
if (!empty && res.empty())
|
||||
|
|
|
|||
Loading…
Reference in a new issue