Commit Graph

22337 Commits

Author SHA1 Message Date
akallabeth
5cd12aed13 [server] add RLGR_MODE checks when read from settings 2026-01-09 09:37:58 +01:00
akallabeth
9feaf16a86 [channels,audin] add value range checks
When reading a enum value from network, first check the value range and
log a message if an invalid value is found
2026-01-09 09:37:55 +01:00
akallabeth
17091e0e08 [channels,rdpemsc] add value range checks
When reading a enum value from network, first check the value range and
abort with a log message if an invalid value is found
2026-01-09 09:37:53 +01:00
akallabeth
ecbfe4a19a [channels,location] add value range checks
When reading a enum value from network, first check the value range and
abort with a log message if an invalid value is found
2026-01-09 09:37:51 +01:00
akallabeth
508a0db07c [channels,rdpecam] add value range checks
When reading a enum value from network, first check the value range and
abort with a log message if an invalid value is found
2026-01-09 09:37:48 +01:00
akallabeth
9b733b7d23 [core,mcs] fix mcs_read_domain_mcspdu_header
add value range checks for MCSPDU and set to DomainMCSPDU_invalid if
an invalid value is found.
2026-01-09 09:24:49 +01:00
akallabeth
541b6a90ae [core,rdp] fix various return values
The return value type did not match declaration
2026-01-09 09:24:46 +01:00
akallabeth
db7b00da2a [core,input] fix SyncEventFlag2Str
Use uint32_t as parameter instead of enum KBD_SYNC_FLAGS, the value
might be outside of the enum range.
2026-01-09 09:24:43 +01:00
akallabeth
5d781b1fce [codec,h264] fix return types and range checks
* use proper enum return values for ffmpeg related functions
* add value range checks for H264_CONTEXT_OPTION_RATECONTROL
* fix various return values
2026-01-09 09:24:41 +01:00
akallabeth
66a3264903 [winpr,sspi] Add type checks for negotiate_read_neg_token
check the value range of negState before using it.
2026-01-09 09:24:38 +01:00
akallabeth
91cd43ea7c [winpr,sspi] fix av pair checks
* check value range of av pair value
* cast to proper type when calling ntlm_av_pair_add
2026-01-09 09:24:36 +01:00
akallabeth
778276caff [utils,types] fix missing type casts 2026-01-09 09:24:33 +01:00
akallabeth
9fc9181473 [core,codecs] fix freerdp_codec_id_to_str
Use UINT32 as argument instead of enum RDP_CODEC_ID as the value might
be an invalid value in the enum.
2026-01-09 09:24:31 +01:00
akallabeth
cb53de0733 [crypto,tls] fix freerdp_tls_connect_ex return values 2026-01-09 09:24:29 +01:00
akallabeth
b7dd905aee [winpr,crt] fix uriUnescapeInPlaceExA call arguments 2026-01-09 09:24:27 +01:00
akallabeth
14897e1bba [winpr,nt] FSInformationClass2Tag parameter
Use UINT32 as input parameter as we might have an invalid value not
contained in the FILE_INFORMATION_CLASS enum
2026-01-09 09:24:24 +01:00
akallabeth
f7f0dd2ba4 [winpr,secapi] document KERB_LOGON_SUBMIT_TYPE
* Add _WIN32_WINNT version defines for enum values
* define KerbInvalidValue for windows
2026-01-09 09:24:21 +01:00
Armin Novak
164dfef442 [warnings] fix signed/unsigned compare warnings 2026-01-09 09:24:19 +01:00
Armin Novak
3f336a3470 [winpr,sspi] remove duplicate definitions
define winpr_SecurityFunctionTable[A,W] before using in a function.
Removes requirement for a forward declaration.
2026-01-09 09:24:17 +01:00
Armin Novak
4090761baa [build,android] undefine __ANDROID_API__ before redefining 2026-01-09 09:24:15 +01:00
akallabeth
df26d30c84 [core,gateway] fix WINPR_CIPHER_TYPE initial value 2026-01-09 09:24:12 +01:00
akallabeth
c8cc0723a1 Merge pull request #12113 from akallabeth/tcp-refactor
Tcp refactor and multi DNS entry fix
2026-01-08 16:50:38 +01:00
Ondrej Holy
72585691fd [core,tcp] Fix PreferIPv6OverIPv4 fallback to IPv4 addresses
Currently, when the `FreeRDP_PreferIPv6OverIPv4` option is `TRUE` and
the `getaddrinfo` function returns IPv4 addresses before IPv6 addresses,
the code tries all IPv6 addresses, but it doesn't try any IPv4 address.
This happens because the `get_next_addrinfo` function skips to the first
IPv6 address, but never goes back to try IPv4 addresses that appeared
earlier in the list. Let's fix this by reordering the address list
first when the `PreferIPv6OverIPv4` option is `TRUE`.

Co-Authored-By: Claude <noreply@anthropic.com>

Related: https://github.com/FreeRDP/FreeRDP/issues/5335
2026-01-08 16:36:37 +01:00
Ondrej Holy
0bdd8da099 [core,tcp] Don't ignore connect errors
The `freerdp_tcp_connect_timeout` function doesn't fail currently in the
case of connection failure (e.g. destination unreachable). It fails only
in the case of the `WSAECONNRESET` error. That seems to be regression from
the refactoring made by commit e6c23cb5. Let's use again the recommended
`getsockopt` function with the `SO_ERROR` argument to check for errors and
fail for all kinds of errors. The nice side-effect is that FreeRDP now
fails with "Failed to connect" instead of "Broken pipe" error.

Co-Authored-By: Claude <noreply@anthropic.com>

Related: https://github.com/FreeRDP/FreeRDP/issues/5335
2026-01-08 16:36:37 +01:00
Ondrej Holy
bd67348eb3 [core,tcp] Try next DNS entry on connect failure
FreeRDP still fails to connect when first DNS entry is unreachable. The
commit 4286a4c doesn't fix that unfortunately. It tries to create a socket
for all DNS entries until the socket is created, but it doesn't verify
that it is actually possible to connect to that socket. Let's call also
the `freerdp_tcp_connect_timeout` function for all the entries until success.

Co-Authored-By: Claude <noreply@anthropic.com>

Related: https://github.com/FreeRDP/FreeRDP/issues/5335
2026-01-08 16:36:37 +01:00
Armin Novak
e65d488a51 [core,tcp] refactor freerdp_tcp_default_connect 2026-01-08 16:36:37 +01:00
akallabeth
1b51752bbd Merge pull request #12105 from akallabeth/clang-warn-fix
Clang warn fixes
2026-01-08 12:25:20 +01:00
Armin Novak
90eae383ee [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:47 +01:00
Armin Novak
7b8bbd7fd9 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:47 +01:00
Armin Novak
c307aa23c8 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:47 +01:00
Armin Novak
f8ac8fb7b6 [c,warnings] fix unterminated string warnings
initialize variables as array to avoid warnings with gcc >= 15 or clang
2026-01-08 11:32:47 +01:00
Armin Novak
a63165939d [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:47 +01:00
Armin Novak
71d283d9c5 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:47 +01:00
Armin Novak
3365d4fb12 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:46 +01:00
Armin Novak
91d865aefb [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:46 +01:00
Armin Novak
f44acc3d25 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:46 +01:00
Armin Novak
d424f51f21 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:46 +01:00
Armin Novak
47a2e5fd77 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:46 +01:00
Armin Novak
4c2caabc83 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:46 +01:00
Armin Novak
0ebdd2995a [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:45 +01:00
Armin Novak
df4b16b41e [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:45 +01:00
Armin Novak
3904cc4b12 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:45 +01:00
Armin Novak
e5af1cf1d6 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:45 +01:00
Armin Novak
6e1ce92290 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:45 +01:00
Armin Novak
310332cdf4 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:45 +01:00
Armin Novak
6a29062e8d [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:45 +01:00
Armin Novak
02f30524ff [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:44 +01:00
Armin Novak
33316ebaad [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:44 +01:00
Armin Novak
bd755236a6 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:44 +01:00
Armin Novak
30ce7423c5 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:44 +01:00