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
5c510af477
[c23,freerdp] replace NULL with nullptr
2026-02-26 15:06:27 +01:00
Armin Novak
e58819830a
[c23] simplify boolean checks
2026-02-26 11:51:05 +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
e0e6a7f800
[freerdp,warnings] properly handle function return
2026-02-16 09:18:37 +01:00
Armin Novak
c173891d78
[clang,warnings] fix Wjump-misses-init
2026-01-08 11:32:40 +01:00
Armin Novak
980284b86e
[core,transport] fix format string warning
2026-01-07 15:59:39 +01:00
Armin Novak
c5131e72be
[core,transport] check if critical section exists
...
When deleting the transport only lock critical sections if the creation
succeeded.
2026-01-07 15:42:57 +01:00
akallabeth
2870ab7937
[core,transport] improve SSL error logging
2025-12-05 10:55:39 +01:00
akallabeth
611dd58bc7
[core,transport] fix inverted condition
2025-09-29 11:56:51 +02:00
akallabeth
1baa721961
[core] fix const correctness
...
Make function arguments const if possible.
2025-09-26 11:18:57 +02:00
akallabeth
53d63b3120
[core,arm] add TARGET_BOOTING error code
...
Propagate the error code for a VM still booting to client.
2025-09-26 10:13:46 +02:00
akallabeth
ed90a55adf
[core] fix BIO_puts implementations
...
* return -2 if not implemented
* add length sanitizion checks
2025-09-01 09:03:10 +02:00
akallabeth
65f18983ed
[warnings] Fix format string errors
...
* Fix casts of format string arguments (%p requires void*)
* Fix format string to match type of arguments
2025-08-13 15:09:48 +02:00
akallabeth
c3e507a82e
[winpr,wlog] Replace WLog_PrintMessage calls
...
Prefer WLog_PrintTextMessage to have proper format string checks in
place.
2025-08-13 15:08:01 +02:00
Armin Novak
e723f8db07
[core,proxy] fix BIO read/write methods
...
Introduced with ae05778644 the return of
BIO_read and BIO_write changed.
Revert this to original behaviour and fix a bug in the proxy code
2025-07-11 13:32:20 +02:00
Armin Novak
7a89e47334
[core,transport] only free userContext if userContextSize > 0
2025-05-28 14:07:58 +02:00
Jonas Ådahl
a4bb702aa6
transport: Initialize function pointers after resource allocation
...
The transport instance is freed when an error occurs.
If the TransportDisconnect function pointer is initialized it
causes SIGSEGV during free.
CVE: CVE-2025-4478
2025-05-13 12:54:27 +02:00
Vic Lee
7338c52893
[core,transport] fix transport written statistics overflowing.
2025-03-19 18:26:28 +08:00
akallabeth
1a5ba989e8
[warnings] fixed integer casts
2025-03-11 17:23:58 +01:00
akallabeth
504e87600c
[core,transport] use allocated streams
...
in transport we end up in a race condition, so do not use the stream
pool for send packets.
2025-02-27 20:30:28 +01:00
akallabeth
74cd8d8fe0
[freerdp,warnings] fix -Wunused-parameter
2025-02-13 15:53:54 +01:00
akallabeth
0969502541
[warnings] fix warnings detected by latest CI build
2025-01-03 09:53:48 +01:00
akallabeth
cc934795e4
[warnings] fix integer casting
...
* use asserting casts to detect overflows or sign conversions
* code cleanup for issues uncovered by casts
2025-01-01 12:58:34 +01:00
akallabeth
62beb27f23
[core,transport] do not stop providing streams from pool
2024-12-19 16:10:23 +01:00
akallabeth
a461f7bc4b
[winpr,streampool] Add StreamPool_WaitForReturn
2024-12-10 13:10:23 +01:00
akallabeth
415f66191a
[core,transport] return NULL stream if no frontBIO
2024-12-10 11:40:22 +01:00
akallabeth
8ff3d282f3
[core,transport] dump streampool statistics
...
when waiting for streampool used streams to be returned print out the
locations of streams still in use
2024-12-10 11:40:13 +01:00
Armin Novak
a8be36f810
[core,transport] properly lock the transport layer
...
data might be sent in different threads. ensure that the context updates
only happen while the read and write locks are held
2024-12-10 11:40:09 +01:00
akallabeth
6d0381e36e
[core,transport] fix reading of data
...
in transport_default_read_pdu only try to read the remaining PDU bytes
if we did not already complete that. Calling transport_read_layer_bytes
with a length of 0 returns 0 whereas every other value returns 1 for
success.
2024-12-03 08:48:18 +01:00
stephanebill
4f2afa8c47
spell check with codespell
2024-11-20 16:53:40 -05:00
akallabeth
026b5218ff
[warnings] fix integer narrowing
2024-10-14 10:32:09 +02:00
akallabeth
429474cd0f
[warnings] fix integer narrowing
2024-10-03 21:21:35 +02:00
akallabeth
c7efbf5b8e
[core,proxy] fix nonblocking BIO reads
...
* In case of non-blocking BIO layers the proxy read functions bailed
out with an error. Retry reading in that case unless the
TcpConnectTimeout is exceeded
* Terminate proxy read operations if rdpContext::abortEvent is set
2024-09-17 10:37:19 +02:00
akallabeth
965d231e49
[return checks] fix use of CloseHandle
2024-09-16 08:22:31 +02:00
akallabeth
94020c183c
[return checks] fix use of ResetEvent
2024-09-16 06:48:09 +02:00
akallabeth
7d67b8e204
[return checks] fix use of SetEvent
2024-09-16 06:47:58 +02:00
akallabeth
4253426e48
[core,transport] follow up to #10576
...
document the behaviour and reference the place it is used to avoid
confusion on future code review
2024-09-09 13:43:43 +02:00
Vic Lee
929e4bdf8d
[core,transport] fix ssl info callback function signature and some warnings.
2024-09-09 17:42:14 +08:00
Vic Lee
ae05778644
[core,transport] add new transport io layer design and support custom socket.
2024-09-05 20:59:21 +08:00
akallabeth
190929c018
[warnings] fix function pointer casts
2024-08-30 15:40:01 +02:00
akallabeth
1de8f5a7aa
[core,gateway] pass rdpContext
...
* pass rdpContext to freerdp_tls_new
* check freerdp_shall_disconnect_context in http_response_recv
2024-06-27 08:42:08 +02:00
akallabeth
4b2d877bf3
[core,transport] document and fix transport_attach
...
* [transport_default_attach] Only attach provided socket once the
function can no longer fail
* [transport_attach] document behaviour
2024-02-23 11:02:06 +01:00
akallabeth
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +01:00
akallabeth
f69e1fe697
[clang-tidy] readability-duplicate-include
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
2fffcd64b9
[winpr] use winpr_strerror instead of strerror
...
use the wrapper from WinPR to use the best implementation available.
2024-02-06 15:45:47 +01:00
akallabeth
ba8cf8cf21
[build] fix Wmismatched-deallocator warnings
...
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
Vic Lee
f2794daf38
[core,transport] make blocking mode available to transport IO interface.
2024-01-22 12:57:01 +01:00