Commit Graph

85 Commits

Author SHA1 Message Date
akallabeth e00661d338
[warnings] fix dead store warnings 2024-09-12 13:29:46 +02:00
akallabeth 265246cdfc
[core,activation] allocate buffer with calloc 2024-09-11 21:03:20 +02:00
akallabeth 403ee7ad4c
[core,activation] simplify rdp_write_client_persistent_key_list_pdu 2024-09-11 20:48:46 +02:00
akallabeth bd637c6cd1
[warnings] fix various clang-tidy warnings 2024-08-29 17:13:50 +02:00
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 d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth 0e44b2c674 [clang-tidy] clang-analyzer-unix.Malloc 2024-02-15 11:49:16 +01:00
akallabeth b8598728a6 [clang-tidy] clang-analyzer-core.uninitialized.Assign 2024-02-15 11:49:16 +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
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 54021b50b0 [core,peer] fix initial state transitions
update initial state transitions according to [MS-RDPBCGR]
the diagram is misleading, some of the text below ambigious, but
1.3.1.1 Connection Sequence phase 10 description lists the dependencies
of server initiated messages.
2023-09-02 07:56:21 +02:00
Armin Novak e61880d077 [standard] replace __FUNCTION__ with __func__ 2023-07-27 20:02:43 +02:00
Armin Novak a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02: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
akallabeth 075506f6c8 [winpr,stream] use new Stream_CheckAndLogRequiredLength* 2023-01-25 14:27:32 +01:00
akallabeth 74530a7931 [format strings] ensure __LINE__ is of type size_t
__LINE__ is not particularily well defined (most fall back to int).
We want to ensure that all the uses in a format string match the format
specifier, so do an explicit cast
2023-01-25 14:27:32 +01:00
akallabeth 8ed37e68d2 [stream] use logging capacity checks 2023-01-25 14:27:32 +01:00
akallabeth 7ab917dca8 Fixed Wsign-compare warnings 2022-12-09 15:58:26 +01:00
akallabeth 4ccb38aa13 [core] Check return value of *_transition_to_state
The state transition might not be allowed, so abort if that fails.
2022-11-16 15:32:32 +01:00
Armin Novak 8210ee77db Fixed return of rdp_client_transition_to_state
Use BOOL to just indicate success/failure and actually check return
of functions called.
2022-11-11 11:51:27 +01:00
Armin Novak 71c3f8e4bb Removed blocking loop in rdp_recv_deactivate_all
The new state machine expects just a state change and will handle
the following transitions from there.
2022-11-11 11:51:27 +01:00
Armin Novak ec019c8910 Fixed (TS_FONT_MAP_PDU)::mapFlags check 2022-11-11 11:51:27 +01:00
akallabeth de8da433ec Unified client and server synchronize PDU checks 2022-11-11 11:51:27 +01:00
akallabeth 33827cb920 Updated RDP state machine
* More detailed states
* Better transition checks
* No more recursive calling of state machine functions
2022-11-11 11:51:27 +01:00
akallabeth b8907711d9 Relaxed font map PDU parsing
Due to some old VBox sending invalid font map PDU do not abort
parsing if a short PDU is received. See #925 for details
2022-11-04 14:46:58 +01:00
akallabeth dbbff452cd Added better logging for font map PDU
rdp_recv_font_map_pdu now logs some warnings if some expected values
are not found in the PDU
2022-11-04 14:46:58 +01:00
akallabeth 2ef506cff2 Better checks on activation received
Check for reactivation, remember resolution, ...
2022-11-04 14:46:58 +01:00
akallabeth 8d067b21e6 Improved protocol check for activation messages 2022-11-04 14:46:58 +01:00
akallabeth c0e3624a10 Code cleanups
prefer use of settings getter
2022-11-04 14:46:58 +01:00
akallabeth 016d2fe689 Renamed rdp_recv_server_synchronize_pdu 2022-11-03 11:56:12 +01:00
akallabeth 1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
David Fort 8d9a43de01
core: various cleanups for persistant cache (#8191) 2022-09-12 10:21:42 +02:00
akallabeth 43b1f51984 Unified setting of finalize_sc_pdus 2022-06-23 14:19:50 +02:00
akallabeth bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
Armin Novak 66e73f8b08 Fixed missing static for functions, fixed declaration of FreeRDPAreColorFormatsEqualNoAlpha 2022-06-21 10:28:34 +02:00
Marc-André Moreau 161617c4a4 Implement RDP persistent bitmap cache 2022-06-08 23:37:06 +02:00
Derek Foreman a547f8c4b0 Fix monitorlayout PDU
commit ec699f6c75 moved the array
allocation into display_convert_rdp_monitor_to_monitor_def without
updating its only call site.

This leads to display_convert_rdp_monitor_to_monitor_def failing
because the array already exists.
2022-06-08 15:09:48 +02:00
akallabeth 73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
Armin Novak eebb0c59b0 Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
akallabeth d3ae821477 Improved logging, compiler warning fixes
* Improved logging in TPKT, TPDU, MCS, PER
* Proper use of rdpSettings functions
* Fixed missing return values
* Refactored rdp_server_transition_to_state
2022-03-28 15:52:32 +02:00
Armin Novak 4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
akallabeth feb6d9ae5c
Set last error on activation timeout (#7502) 2021-12-17 17:28:41 +01:00
Armin Novak 72d6671d5f Improved bitmap chache input checks 2021-12-14 13:46:34 +01:00
Armin Novak 81a2f9e434 WINPR_ASSERT activation.c 2021-09-09 08:36:01 +02:00
akallabeth 00ac11524e Wrapped rpdRdp:state access in getter/setter
* Only access state via getter/setter
* Better state debuggind with log messages on state transition
2021-09-06 10:11:14 +02:00
akallabeth 8d82adb28a Fixed warnings 2021-06-17 10:35:22 +02:00
akallabeth 5409f4f043 Implemented 2.2.1.17.1 Persistent Key List PDU Data, added checks
* Implemented missing server side version of PDU (just skip data)
* Refactored read/write functions to properly check stream
  length/capacity and handle return values.
2020-11-20 09:39:25 +01:00