[warnings] fix integer narrowing
This commit is contained in:
parent
e878927cd7
commit
f9bfaba0d2
@ -1249,7 +1249,7 @@ static BOOL rdg_send_http_request(rdpRdg* rdg, rdpTls* tls, const char* method,
|
||||
sz = Stream_Length(s);
|
||||
|
||||
if (sz <= INT_MAX)
|
||||
status = freerdp_tls_write_all(tls, Stream_Buffer(s), (int)sz);
|
||||
status = freerdp_tls_write_all(tls, Stream_Buffer(s), sz);
|
||||
|
||||
Stream_Free(s, TRUE);
|
||||
return (status >= 0);
|
||||
@ -1316,7 +1316,7 @@ static BOOL rdg_tls_connect(rdpRdg* rdg, rdpTls* tls, const char* peerAddress, i
|
||||
}
|
||||
|
||||
tls->hostname = settings->GatewayHostname;
|
||||
tls->port = (int)settings->GatewayPort;
|
||||
tls->port = MIN(UINT16_MAX, settings->GatewayPort);
|
||||
tls->isGatewayTransport = TRUE;
|
||||
status = freerdp_tls_connect(tls, bufferedBio);
|
||||
if (status < 1)
|
||||
@ -1722,13 +1722,7 @@ static int rdg_write_chunked_data_packet(rdpRdg* rdg, const BYTE* buf, int isize
|
||||
Stream_SealLength(sChunk);
|
||||
len = Stream_Length(sChunk);
|
||||
|
||||
if (len > INT_MAX)
|
||||
{
|
||||
Stream_Free(sChunk, TRUE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
status = freerdp_tls_write_all(rdg->tlsIn, Stream_Buffer(sChunk), (int)len);
|
||||
status = freerdp_tls_write_all(rdg->tlsIn, Stream_Buffer(sChunk), len);
|
||||
Stream_Free(sChunk, TRUE);
|
||||
|
||||
if (status < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user