Commit Graph

4131 Commits

Author SHA1 Message Date
Armin Novak
7d2f75881c [core,license] fix unused result warnings 2026-03-02 12:08:44 +01:00
Armin Novak
2b0637d629 [nodiscard] mark more internal functions 2026-03-02 11:57:27 +01:00
Armin Novak
e6fca2c021 [winpr,stream] Fix Stream_SetPosition return checks 2026-03-02 11:37:20 +01:00
Armin Novak
5a532269ef [winpr,stream] Check Stream_SetLength return 2026-03-02 11:08:08 +01:00
Armin Novak
92ab55c5e1 [winpr,stream] Add Stream_ResetPosition
A helper function that does not require return checks, in contrast to
Stream_SetPosition, which might fail.
2026-03-01 06:11:59 +01:00
Armin Novak
eb0aa95ca4 [core,utils] abort channel reload if not allocated 2026-02-27 19:05:11 +01:00
Armin Novak
9a9c74b69e [core] add null checks
when a client instance disconnects it might have failed to allocate some
resources. So ensure all used ones are there
2026-02-27 19:05:10 +01:00
Armin Novak
7b47aac9e6 [core,rdp] fix return checks for PubSub_OnErrorInfo 2026-02-27 15:52:31 +01:00
Armin Novak
ea77d2d922 [nodiscard] fix all InitOnceExecuteOnce usages 2026-02-27 15:52:28 +01:00
Armin Novak
89ab3c6c1b [nodiscard] Fix all winpr_RAND usages
* Check return value and act on it.
* Initialize arrays that were missed before.
2026-02-27 15:52:26 +01:00
Armin Novak
5c510af477 [c23,freerdp] replace NULL with nullptr 2026-02-26 15:06:27 +01:00
akallabeth
4ebe580c57 Merge pull request #12380 from mfleisz/new-logonerrinfo-define
[libfreerdp] Add new define for logon error info
2026-02-26 14:33:27 +01:00
Martin Fleisz
5146a13587 [libfreerdp] Add new defines for logon error info 2026-02-26 14:17:18 +01:00
Armin Novak
10dc90cca7 [core,update] reset update->us immediately 2026-02-26 13:46:57 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
0531803808 [warnings] make function declaration names consistent
Use the same parameter names for declaration and implementation.
2026-02-26 10:35:25 +01:00
Armin Novak
96be117f97 [core,gateway] fix rts_read_common_pdu_header
The function does not return BOOL but 3 possible conditions, so use a
proper enum type for this.
2026-02-26 08:49:42 +01:00
Armin Novak
166a569784 [core,gateway] ignore incomplete rpc header 2026-02-25 22:52:26 +01:00
akallabeth
6dfad2077c Merge pull request #12372 from akallabeth/gw-policy-deny
[core,utils] ignore NULL values in remove_rdpdr_type
2026-02-25 20:02:41 +01:00
Armin Novak
7591cd8e51 [core,utils] ignore NULL values in remove_rdpdr_type
if there are no redirected devices of given type ignore the NULL value
and return success.
2026-02-25 19:53:00 +01:00
Armin Novak
208bcbd153 [winpr] Add initializer functions
* Add initializer for wStream
* Add initializer for ASN1 decoder
2026-02-25 19:39:24 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
Armin Novak
e9723d1b61 [attributes] update attribute definitions
* support C++
* support C23
* replace __inline et al with C11 inline
2026-02-25 11:51:11 +01:00
akallabeth
8892558b4e Merge pull request #12360 from akallabeth/attr-nodiscard-libfreerdp
[libfreerdp] mark internal functions [[nodiscard]]
2026-02-25 10:13:23 +01:00
Armin Novak
3fcc287b16 [warnings] initialize all va_list 2026-02-25 07:41:39 +01:00
Armin Novak
4e4f84d33d [libfreerdp] mark internal functions [[nodiscard]] 2026-02-24 11:54:00 +01:00
Armin Novak
c3c9a723e0 [core,gateway] fix rdg_pkt_type_to_string 2026-02-23 11:28:37 +01:00
Armin Novak
3d8bcd1c71 [core,gateway] parse [MS-TSGU] 2.2.10.5 HTTP_CHANNEL_RESPONSE_OPTIONAL Structure
just to avoid warnings about incompletely parsed packets. Currently
unused as no UDP support is implemented.
2026-02-23 11:10:18 +01:00
akallabeth
1b744c15fe Merge pull request #12319 from akallabeth/grow-reasonable
[allocations] fix growth of preallocated buffers
2026-02-17 15:23:17 +01:00
Armin Novak
118afc0b95 [allocations] fix growth of preallocated buffers
* Replace * 2 with * sizeof(WCHAR) for string usages
* Grow streams and other buffers reasonably, e.g. add 128 elements per
  try and check for possible overflows
* Add constant postfix to force them to 64bit
2026-02-17 13:54:34 +01:00
Armin Novak
df64d00a97 [warnings,api] fix -Wunused-result
With marking publid API [[nodiscard]] some problematic error checks in
the core library were uncovered. This commit addresses these
shortcomings.
2026-02-17 11:07:08 +01:00
akallabeth
a25b90adc2 Merge pull request #12311 from akallabeth/winpr-attr-nodiscard-fkt-ptr
Winpr attr nodiscard fkt ptr
2026-02-16 09:32:52 +01:00
Armin Novak
e0e6a7f800 [freerdp,warnings] properly handle function return 2026-02-16 09:18:37 +01:00
Armin Novak
361d73bc0e [core,settings] use WINPR_KBD_TYPE constants
To initialize FreeRDP_KeyboardType use WINPR_KBD_TYPE_IBM_ENHANCED
enum constant.
2026-02-15 19:18:54 +01:00
Armin Novak
9903e234e4 [core,gateway] fix sign warnings from tsg 2026-02-13 12:16:17 +01:00
Armin Novak
f0ee9d7b6f [core,test] fix use after free 2026-02-13 09:25:55 +01:00
Armin Novak
ccb79eb4d0 [core,test] make TestUtils verbose
* Add logging to TestUtils
2026-02-11 17:02:37 +01:00
Armin Novak
4542715e37 [core,test] Add definitions for TestUtils
The unit test needs some variables defined, ensure they are.
2026-02-11 16:46:48 +01:00
Armin Novak
1defc14055 [core,test] fix missing WITH_RESOURCE_VERSIONING 2026-02-11 09:56:55 +01:00
Armin Novak
82dbf58296 [core,settings] initialize settings with application details 2026-02-10 11:20:14 +01:00
Armin Novak
d9e81aed22 [core,smartcardlogon] use freerdp_getApplicationDetailsString 2026-02-10 11:20:13 +01:00
Martin Fleisz
e4794883d1 Merge pull request #12283 from akallabeth/gw-relax
[core,gateway] relax TSG parsing
2026-02-09 10:40:30 +01:00
Armin Novak
5f958d5edf [core,gateway] relax TSG parsing
* Relax 2.2.9.2.1.5 TSG_PACKET_RESPONSE::responseDataLen checks, ignore
  padding data.
* Add stringification for TSG version caps
* Add log messages for caps
2026-02-09 10:19:36 +01:00
akallabeth
043179f916 [core,test] add utils tests
Add unit tests for getter/setter of freerdp_setApplicationDetails
2026-01-29 22:47:47 +01:00
Armin Novak
39e33d9e9d [utils,helpers] add application details getter/setter
* Allow an application to set a vendor/product/version namespace to search
  for configuration files/settings/...
* Replace all FREERDP_VENDOR_STRING and similar macros with these
  getters.
2026-01-29 22:47:45 +01:00
akallabeth
fe7c5ab7e9 [core,settings] improve rdpMonitor log
stringify the orientation value in the log message.
2026-01-29 22:06:34 +01:00
Jonas Ådahl
4ea803134e peer: Disconnect if Logon() returned FALSE
Returning FALSE implies the client was not authorized, but it does not
have any real impact on the connection, other than setting the
authorized field.

Change this by disconnecting the client if a Logon() callback returned
that a client was not authorized.
2026-01-27 19:39:42 +01:00
akallabeth
076a8386a6 Merge pull request #12186 from akallabeth/error-handling-fixes
Error handling fixes
2026-01-26 17:05:19 +01:00
akallabeth
7990eec166 [freerdp] mark all WINPR_ATTR_MALLOC also nodiscard 2026-01-26 13:39:39 +01:00
akallabeth
3f163cee9c [warnings] fix unused result warnings 2026-01-26 13:22:24 +01:00