Fixed #4476: broken casts/variable sizes for custom BIO calls.

This commit is contained in:
Armin Novak 2018-05-03 12:24:16 +02:00
parent 456b0e8934
commit 5765e9a422
5 changed files with 7 additions and 7 deletions

View File

@ -836,7 +836,7 @@ static BOOL rdg_tunnel_connect(rdpRdg* rdg)
BOOL rdg_connect(rdpRdg* rdg, int timeout, BOOL* rpcFallback)
{
BOOL status;
int outConnSocket = 0;
SOCKET outConnSocket = 0;
char* peerAddress = NULL;
assert(rdg != NULL);

View File

@ -1936,7 +1936,7 @@ static long transport_bio_tsg_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
{
if (arg2)
{
*((ULONG_PTR*) arg2) = (ULONG_PTR) tsg->rpc->client->PipeEvent;
*((HANDLE*) arg2) = tsg->rpc->client->PipeEvent;
status = 1;
}
}

View File

@ -201,7 +201,7 @@ static long transport_bio_simple_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
if (!BIO_get_init(bio) || !arg2)
return 0;
*((ULONG_PTR*) arg2) = (ULONG_PTR) ptr->socket;
*((SOCKET*) arg2) = ptr->socket;
return 1;
}
else if (cmd == BIO_C_GET_EVENT)
@ -209,7 +209,7 @@ static long transport_bio_simple_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
if (!BIO_get_init(bio) || !arg2)
return 0;
*((ULONG_PTR*) arg2) = (ULONG_PTR) ptr->hEvent;
*((HANDLE*) arg2) = ptr->hEvent;
return 1;
}
else if (cmd == BIO_C_SET_NONBLOCK)
@ -718,7 +718,7 @@ static char* freerdp_tcp_get_ip_address(int sockfd, BOOL* pIPv6)
return freerdp_tcp_address_to_string(&saddr, pIPv6);
}
char* freerdp_tcp_get_peer_address(int sockfd)
char* freerdp_tcp_get_peer_address(SOCKET sockfd)
{
struct sockaddr_storage saddr = { 0 };
socklen_t length = sizeof(struct sockaddr_storage);

View File

@ -67,6 +67,6 @@ FREERDP_LOCAL int freerdp_tcp_connect(rdpContext* context,
rdpSettings* settings,
const char* hostname, int port, int timeout);
FREERDP_LOCAL char* freerdp_tcp_get_peer_address(int sockfd);
FREERDP_LOCAL char* freerdp_tcp_get_peer_address(SOCKET sockfd);
#endif /* FREERDP_LIB_CORE_TCP_H */

View File

@ -687,7 +687,7 @@ static int tls_do_handshake(rdpTls* tls, BOOL clientMode)
int status;
struct pollfd pollfds;
#elif !defined(_WIN32)
int fd;
SOCKET fd;
int status;
fd_set rset;
struct timeval tv;