Armin Novak
4b4368fc19
[compiler,gcc] fix function pointer casts
...
use dedicated macro WINPR_FUNC_PTR_CAST to cast function pointers
without warnings.
2026-03-03 17:24:10 +01:00
Armin Novak
0d99896094
[core,return] improve return value checks
...
propagate error conditions back the call chain
2026-03-03 17:15:12 +01:00
Armin Novak
45494b02a3
[core,server] FreeRDP_WTSVirtualChannelRead checks
...
Properly check MessageQueue_Peek return and propagate failure.
2026-03-03 17:15:11 +01:00
akallabeth
63df758f73
Merge pull request #12414 from akallabeth/wts-fix
...
[core,server] Improve WTS API locking
2026-03-03 16:44:52 +01:00
Armin Novak
d079f59e55
[core,server] Improve WTS API locking
...
* Use InitOnceExecuteOnce to initialize global hash table for server
handles
* Lock full function calls when manipulating global data (Hash table and
session ID count)
2026-03-03 16:31:18 +01:00
Armin Novak
a9e0abf2ea
[core,orders] improve input validation
...
check length before subtracting. Might underflow and be cought by the
next check, but lets be strict.
2026-03-03 13:58:52 +01:00
Armin Novak
ce3f205cd6
[core,gateway] fix missing return checks
2026-03-03 13:49:58 +01:00
Armin Novak
17163d3738
[winpr,collections] fix PubSub_OnEvent return checks
...
* proper return checks on use
* fix return on invalid input arguments
* fix return on no event registered
2026-03-03 13:49:54 +01:00
Armin Novak
75d8f295b4
[checks,return] Fix missing *_foreach return checks
...
* Check HashTable_Foreach return
* Check ArrayList_ForEach return
2026-03-03 11:07:59 +01:00
Armin Novak
103e0907cc
[core,caps] use getter/setter for MultifragMaxRequestSize
...
to ease debugging use the getter/setters instead of direct struct
access.
2026-03-03 09:30:34 +01:00
Armin Novak
35831303ea
[various] add proper return checks
2026-03-02 18:32:38 +01:00
Armin Novak
8316bca9dd
[winpr,stream] fix Stream_Write_UTF16_String return checks
2026-03-02 17:36:41 +01:00
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