7086 Commits

Author SHA1 Message Date
Armin Novak
b1cbaaa9fb [codec,dsp] fix Wimplicit-int-enum-cast warnings 2026-01-14 10:38:41 +01:00
akallabeth
085f4e9705 [core,client] fix SVC channel init calls
Ensure correct types are passed and returned.
2026-01-13 17:11:24 +01:00
akallabeth
d8810c2b65 [core,orders] fix brush update decoding 2026-01-13 07:52:56 +01:00
akallabeth
1ed5e53c3b [core,gcc] fix integer promotion issue 2026-01-12 11:37:34 +01:00
akallabeth
57c5647d98 [utils,smartcard] add length validity checks
in smartcard_unpack_set_attrib_call input length validity checks were
missing.
2026-01-12 09:03:28 +01:00
akallabeth
011737296d [crypto,base64] do proper length checks
relying on casting is error prone, so do proper index range checks.
2026-01-10 10:23:12 +01:00
akallabeth
62a9e787ed [crypto,base64] ensure char is singend 2026-01-10 09:02:02 +01:00
akallabeth
11ca842135 [core,gateway] ignore unknown http headers 2026-01-10 07:55:52 +01:00
akallabeth
720de91336 [core,gateway] refactor http_response_parse_header_field
Ensure there are no NULL dereferences
2026-01-09 11:56:06 +01:00
akallabeth
4819742644 [core,tcp] freerdp_host_connect fix double free
let freerdp_host_connect clean up resources, get_next_addrinfo only
flags success or error
2026-01-09 11:56:04 +01:00
akallabeth
a46d813ca9 [core,tcp] fix freerdp_vsock_connect socket leaks 2026-01-09 11:56:01 +01:00
akallabeth
0f7e40c1e5 [codec,dsp] fix sign warnings 2026-01-09 09:38:05 +01:00
akallabeth
ef93393152 [core,nla] 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:38:03 +01:00
akallabeth
f87cb28a44 [core,gateway] add rts 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:38:00 +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
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
Armin Novak
164dfef442 [warnings] fix signed/unsigned compare warnings 2026-01-09 09:24:19 +01:00
akallabeth
df26d30c84 [core,gateway] fix WINPR_CIPHER_TYPE initial value 2026-01-09 09:24:12 +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
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
6b36ace10b [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:42 +01:00
Armin Novak
2a1c0bbdfc [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:42 +01:00
Armin Novak
d228b0f3d3 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:42 +01:00
Armin Novak
aa96853483 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:42 +01:00
Armin Novak
abb7d9db17 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:42 +01:00
Armin Novak
aabaf91f9c [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:42 +01:00
Armin Novak
361d0e80f8 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
7ba7501777 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
8343f0596f [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
2d3cb653ce [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
4a2262d52a [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
f7478f906c [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
385e697f34 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:40 +01:00
Armin Novak
c173891d78 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:40 +01:00
Armin Novak
e935146e07 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:40 +01:00
Armin Novak
8ba3babc09 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:40 +01:00
Armin Novak
fe63c0a362 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:40 +01:00
Armin Novak
bc76a09d3b [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:40 +01:00