Commit Graph

237 Commits

Author SHA1 Message Date
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
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
4e4f84d33d [libfreerdp] mark internal functions [[nodiscard]] 2026-02-24 11:54:00 +01:00
Armin Novak
e0e6a7f800 [freerdp,warnings] properly handle function return 2026-02-16 09:18:37 +01:00
Armin Novak
385e697f34 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:40 +01:00
akallabeth
83ffa524e9 [core,settings] fix ReceivedCapabilities reset 2025-08-26 12:09:09 +02:00
akallabeth
81131dddb9 [core,rdp-sec] unify security flags on UINT16 2025-03-31 19:32:06 +02:00
Eyal Tolchinsky
9be45a9fac [core] standard RDP race condition on sec_flags
Had a race condition when using standard RDP security layer, where
multiple threads accessed |rdp->sec_flags| and modified it. This commit
removes the above field and converts to using a stack variable.
2025-03-31 17:46:12 +03:00
akallabeth
1a5ba989e8 [warnings] fixed integer casts 2025-03-11 17:23:58 +01:00
akallabeth
1fe0ca41e1 [warnings] fix missing integer casts 2025-03-11 13:20:19 +01:00
akallabeth
74cd8d8fe0 [freerdp,warnings] fix -Wunused-parameter 2025-02-13 15:53:54 +01:00
akallabeth
1bfc9c7c1a [core,update] split update_send_new_or_existing_window 2025-02-11 10:14:54 +01:00
akallabeth
0aab574bbf [core,update] split update_write_bitmap_data 2025-02-11 10:14:51 +01:00
akallabeth
72cf699516 [core,update] split update_send_new_or_existing_notification_icons 2025-02-11 10:14:50 +01:00
akallabeth
ea2022b76b [clang,tidy] fix warnings 2025-01-15 09:32:52 +01:00
akallabeth
d6e23d18d7 [warnings] fix return and overflow warnings 2025-01-08 18:21:57 +01:00
gpotter2
f91d33e38c Fix return value of update_check_flush 2025-01-05 06:16:47 +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
cbr-rc
7db06cc359 do not always return FALSE when gdi is NULL 2024-11-14 17:27:10 +01:00
akallabeth
566d4cf637 [stream] fix sign issues with stream API use 2024-10-29 15:50:07 +01:00
akallabeth
5f86284663 [core,orders] fix update_write_coord
* Add value range checks
* Add proper log message
* Add failure return
2024-10-25 11:48:14 +02:00
akallabeth
40ba7aa03a [warnings] fix integer narrowing 2024-10-03 21:21:36 +02:00
akallabeth
586f40631f [warnings] fix shorten-64-to-32 2024-09-17 16:13:48 +02:00
akallabeth
36c3184a0f [warnings] fix clang-tidy issues in libfreerdp 2024-08-29 15:34:22 +02:00
akallabeth
63d87dcf18 [core,update] ensure EndPaint before DesktopResize
When DesktopResize is called EndPaint might not have been. Ensure the
update-lock is released and data flushed before resizing.
2024-08-20 09:54:56 +02:00
Armin Novak
a332613ea1 [core,update] force deactivate AsyncUpdate
With recent releases various race conditions with AsyncUpdate have been
found. As there is no easy way to properly fix this deactivate it for
the time being and warn users about it.
2024-07-22 10:24:11 +02:00
akallabeth
cb15c1c78a [core,update] fix missing plausibility check
abort parsing of cache brush if not enough data is available.
2024-04-22 11:02:04 +02:00
akallabeth
a95426e7c4 [core,update] return if gdi is NULL 2024-04-21 14:28:24 +02:00
akallabeth
db09d1d7f8 [core,update] fix leak on error termination 2024-04-21 14:28:24 +02:00
akallabeth
fd46a43934 [core,update] reset invalid regions after BeginPaint
Do not touch invalid regions before BeginPaint was called. This fixes
issue #9953 as the sdl client is waiting in BeginPaint for the screen
updates of EndPaint to be actually drawn.
2024-03-11 12:15:52 +01: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
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
Armin Novak
b02d4a81b5 [core,update] reset invalid regions at BeginPaint
The client must handle graphics updates in EndPaint.
If we already reached BeginPaint again reset the invalidated regions
as they are already processed and start anew. Fixes #9672
2023-12-20 09:28:53 +01:00
Armin Novak
492cbc8e6f [opaque_settings] reorder internal includes
order is important for internals, as the deprecation warnings are
deactivated for this use case
2023-11-24 21:23:38 +01:00
akallabeth
1163cc4d5c [core] add internal settings.h include 2023-11-24 14:54:56 +01:00
akallabeth
c1db0029d9 [core,update] fix possible leak on gdi reset 2023-09-20 09:29:45 +02:00
akallabeth
d3ba8ebf00 [core,update] log BeginPaint/EndPaint failure 2023-08-23 14:27:51 +02:00
akallabeth
769ffbd8a0 [core,fastpat] add logging for failures 2023-08-23 14:27:51 +02:00
akallabeth
22fffdd5ea [freerdp,api] log NULL IFCALL/IFCALLRET calls 2023-08-04 12:59:11 +02:00
Armin Novak
0bdb62e9b5 [libfreerdp] fix integere narrow warnings 2023-07-28 15:48:32 +02:00
akallabeth
4d350978dd [core] assert rdp->context 2023-06-26 10:53:43 +02:00
Armin Novak
970f0c54e8 [stream] use const correct Stream_Pointer access 2023-06-08 08:09:33 +02:00
Pascal Nowack
8362b3707e pointer: Rename position to hotspot position in Color Pointer Update
The attributes xPos and yPos for a Color Pointer Update are confusing,
as they may be confused with the xPos and yPos of the pointer bitmap on
the actual screen.
Rename these attributes to what they actually represent, and that is the
hotspot position.
xPos and yPos are still members of the hotspot. However, hotSpotX and
hotSpotY are much more clearer.
In addition to that, the Large Pointer Update uses the same names for
the hotspot coordinates.
2023-04-14 08:31:20 +02:00
akallabeth
075506f6c8 [winpr,stream] use new Stream_CheckAndLogRequiredLength* 2023-01-25 14:27:32 +01:00
Armin Novak
31827485a8 [core,update] do not require EndPaint callback
Some RDP servers start sending graphics updates too early for us to
process. This triggered a bug that at that point the EndPaint callback
is not available, as the connection is not fully established.
2022-11-30 11:44:15 +01:00
akallabeth
a1dff38807 Add assertions in update module 2022-10-07 11:01:25 +02:00
Armin Novak
23dd484824 Revert "Added a check in DesktopResize for protocol violations"
This reverts commit 07a5a6ef6d.
2022-07-06 12:01:23 +02:00