Commit Graph

218 Commits

Author SHA1 Message Date
akallabeth
1d33095500
[warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
akallabeth
86f2b1e26a
[core,capabilities] skip stream bytes read in substream 2024-07-25 11:19:15 +02:00
Armin Novak
f167ccff4e
[core,capabilities] Fix SurfaceCommandsSupported
* Initialize in settings_new with everything supported
* merge client & server settings
* Write capabilities from current SurfaceCommandsSupported setting
2024-07-24 21:54:54 +02:00
Armin Novak
850389de44
[core,capabilities] pass RemoteFxRlgrMode and RemoteFxCodecMode 2024-07-24 21:54:51 +02:00
Armin Novak
22585a31ce
[core,capabilities] fix NSCodecId and SurfaceCommandsSupported parsing 2024-07-24 21:54:42 +02:00
Armin Novak
e888769bf6
[core,capabilities] fix RFX capability parsing
* Require SURFCMDS_STREAM_SURFACE_BITS
* Improve error logging
* Improve content length checks
2024-07-24 21:54:30 +02:00
akallabeth
17d195b7a6
[core,capabilities] fix CapsProtocolVersion
if the wrong version 0x0000 is sent (older FreeRDP based servers)
correct the value to TS_CAPS_PROTOCOLVERSION (0x0200) along with a
warning message.
2024-07-06 12:48:11 +02:00
Armin Novak
8d783d5189
[covertity] fix various warnings 2024-06-05 09:19:59 +02:00
akallabeth
8d5c5dc2ef
[core,caps] Allow invalid TS_GENERAL_CAPABILITYSET::protocolVersion
some FreeRDP versions did send an invalid value of 0x0000 instead of the
required 0x200. Log this kind of violation but continue.
2024-05-20 15:13:12 +02:00
Armin Novak
e9bfd585ae [core,capabilities] ensure ImeFileName is '\0' terminated 2024-04-25 10:27:58 +02:00
akallabeth
3fe9363592 [core,capabilities] abort on invalid protocolVersion
* TS_GENERAL_CAPABILITYSET::protocolVersion must be
  TS_CAPS_PROTOCOLVERSION(0x200) see [MS-RDPBCGR] 2.2.7.1.1
  General Capability Set (TS_GENERAL_CAPABILITYSET)
* Default value of FreeRDP_CapsProtocolVersion must be
  TS_CAPS_PROTOCOLVERSION(0x200)
2024-04-23 17:13:13 +02:00
Мартынов Максим Сергеевич
890d87f81a Fix protocolVersion capability reset 2024-04-23 16:03:30 +02:00
akallabeth
449e8b82f1 [core,capabilities] check TS_BITMAPCACHE_CAPABILITYSET_REV2
Check value of TS_BITMAPCACHE_CAPABILITYSET_REV2::numCellCaches for out
of range.
2024-04-23 09:40:36 +02:00
akallabeth
8b616f4fad [core,capabilities] ensure destination array exists
ensure the destination array in rdpSettings is large enough to hold the
copy.
2024-04-22 17:41:46 +02:00
akallabeth
1e325dc2de [core,settings] add missing autoreconnect option
Split settings, there was a double use for AutoReconnectEnabled.
AutoReconnectEnabled is a setting responsible for client side
autoreconnection.
AutoReconnectPacketSupported is a flag set by the server to announce
support for AutoReconnectPacket allowing fast reconnect.
2024-04-11 11:19:18 +02:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
Armin Novak
468106033f [core,capabilities] disable surface command
if the remote end does not support fastpath disable surface commands.
2023-12-06 20:14:02 +01:00
Armin Novak
195d665af6 [core,caps] added rdp_input_flag_string 2023-12-06 10:45:01 +01:00
Armin Novak
4d50d59e7e [settings] renamed VirtualChannelCompressionFlags 2023-11-24 14:54:56 +01:00
Armin Novak
37bd7e0959 [settings] renamed VirtualChannelChunkSize
in [MS-RDPBCGR] it is named VCChunkSize
2023-11-24 14:54:56 +01:00
Armin Novak
6e6559c41a [settings] fix type mismatch warnings 2023-11-24 14:54:56 +01:00
akallabeth
cd4d77af86 [settings] add deprecation warnings
direct struct access to rdpSettings now produces warnings if not
explicitly deactiaved by defining FREERDP_SETTINGS_INTERNAL_USE
2023-11-24 14:54:56 +01:00
akallabeth
1163cc4d5c [core] add internal settings.h include 2023-11-24 14:54:56 +01:00
akallabeth
0ee61dcb62 [core,connection] improve parsing of demand active
Split up parsing, so we don´t have to reread the data.
2023-11-21 13:54:29 +01:00
Armin Novak
98a4eb77ef [core] VirtualChannelChunkSize adjustments
* add CHANNEL_CHUNK_MAX_LENGTH
* remove duplicate definitions
* default to CHANNEL_CHUNK_MAX_LENGTH
2023-11-03 12:43:25 +01:00
akallabeth
1f7bc15bb1 [settings] add HasQoeEvent 2023-10-13 16:05:27 +02:00
Armin Novak
76169c26cd [core,caps] fix warnings 2023-07-27 20:02:43 +02:00
Martin Fleisz
622a2a8df0 misc: More int to BOOL conversion fixes
This is a follow up to #9129.

This PR fixes some problematic `int` to `BOOL` conversions that might
cause overflows when checking for bit flags.
2023-07-04 09:45:20 +02:00
Armin Novak
52ec17309a [core,caps] use settings getter/setter for unicode 2023-06-23 08:18:16 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
Armin Novak
a433e1b761 [core,rdp] use a dynamic logger for rdpRdp 2023-05-23 05:04:55 +02:00
Pascal Nowack
50c3559a43 core/capabilities: Fix handling of Virtual Channel Capability Set
The VirtualChannelChunkSize can only be larger than 1600 Bytes, when
both client and server write that value in their capability set
regardless of the value itself.
Also, Microsoft clients and servers only advertise the capabilities that
are relevant for the other peer, e.g. mstsc only tells the server that
it supports decompressing compressed data from the server, but it does
not advertise, that it is able to compress data for the server.

Additionally, correctly apply the read capabilities after reading them.
2023-05-02 09:51:40 +02:00
Armin Novak
ca706e3099 [core,caps] fix invalid imeFileName
imeFileName might contain invalid characters, ignore these
2023-03-06 08:35:24 +01:00
akallabeth
a082f2b78a [core] improve logging 2023-02-03 11:09:59 +01:00
akallabeth
f355c9addd [core,capability] Fix reallocation of ReceivedCapabilityData
if the size is 0 do not abort but continue.
2023-01-27 10:07:01 +01:00
Armin Novak
70f6c09ff4 [core] fix persistent bitmap cache setting
* Only activate if both, client and server support the capability
* Use settings getter to access setting
2023-01-26 09:30:17 +01:00
Armin Novak
641022b795 [logging] remove __FUNCTION__ from actual message
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth
8ed37e68d2 [stream] use logging capacity checks 2023-01-25 14:27:32 +01:00
Armin Novak
d4d2b4403c [core] Improve redirection logging 2023-01-23 11:37:44 +01:00
Martin Fleisz
9c6a0eeeb1 core: Fix handling of RAIL HandshakeEx flag
When using Enhanced RAIL the HandshakeEx flag must also be set. However
in the current code it was always overwritten by the server flags (which
might lack the flag).
2023-01-20 10:37:56 +01:00
Armin Novak
6ff458bb34 [core] Make remote rdpSettings* context wide
The settings struct containing the data sent by the remote is now
context wide. This way it is always possible to retrieve the data.
2023-01-18 09:55:06 +01:00
akallabeth
37ab25e19d Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
akallabeth
ca5684c968 [settings,caps] Removed ColorPointerFlag
* The setting is obsolete and can be replaced by a constant
* Only check the receive function for proper value and print a warning
2022-12-06 09:08:12 +01:00
akallabeth
6aa8253b6c [core,capabilities] Fix pointer cache size logic 2022-12-06 09:08:12 +01:00
akallabeth
f2545a2ad7 [core,capabilities] Always send PointerCacheSize
While the field is optional it can always be sent with a value of 0 to
have the same meaning as leaving it out.
2022-12-06 09:08:12 +01:00
akallabeth
6e82adea17 [cache,pointer] Fixed cache size checks
PointerCache and ColorPointerCache can be of different size
2022-12-06 09:08:12 +01:00
akallabeth
5799fb2018 Replace ConvertFromUnicode and ConvertToUnicode
* Use new ConvertUtf8ToWChar, ConvertUtf8NToWChar,
  ConvertUtf8ToWCharAlloc and ConvertUtf8NToWCharAlloc
* Use new ConvertWCharToUtf8, ConvertWCharNToUtf8,
  ConvertWCharToUtf8Alloc and ConvertWCharNToUtf8Alloc
* Use new Stream UTF16 to/from UTF8 read/write functions
* Use new settings UTF16 to/from UTF8 read/write functions
2022-11-28 10:42:36 +01:00
akallabeth
7faf13a811 [core,capabilities] fix pointer cache size read 2022-11-22 15:30:31 +01:00