Commit Graph

193 Commits

Author SHA1 Message Date
Armin Novak
fd027d1bf0 Removed BUILTIN_CHANNELS
Building client channels out of tree does not work reliable as the
dependencies can not be easily split. (exceptions may be simple ones
as echo channel)
It does complicate the build system and code though, so remove this
for maintainability reasons.
2022-02-23 10:43:46 +01:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak
b9cfa10513 Fixed some more warnings 2022-01-31 15:55:10 +01:00
akallabeth
4b416968c4 Added checks and asserts in rdpgfx_common 2022-01-27 10:33:30 +01:00
akallabeth
6f154da1ae Added plausibility checks and assert to rdpgfx_read_header 2022-01-27 09:50:35 +01:00
zbstao
5b8db18f26 Added pduLength check in rdpgfx_read_header function
if pduLength is zero will lead to an infinite loop in rdpgfx_recv_pdu function.
2022-01-27 16:24:26 +08:00
Armin Novak
fe4c30fc54 Fixed warning in rdpgfx server channel 2021-12-14 13:46:34 +01:00
Armin Novak
96cf17a45b Replaced (IWTSPlugin*) casts with struct address return 2021-10-07 16:22:04 +02:00
akallabeth
7b7e2d6f32 Prefer constant division over multiplication for length checks 2021-09-21 08:55:22 +02:00
akallabeth
7dfdd248ee
Monitor coordinates are exclusive (#7145)
* Monitor coordinates are exclusive

* Remove force override of shadow resolution.

The client might ignore the server requested values, in that case
retry
2021-07-07 11:54:01 +02:00
akallabeth
0ab809d696
Fixed WINPR_ASSERT statement (#7148) 2021-07-02 18:42:22 +02:00
akallabeth
a199d2a051 Added better logging and assertions for gfx 2021-07-02 09:53:24 +02:00
akallabeth
2101aadceb Fixed missing assertions and default color depth 2021-07-02 09:53:24 +02:00
akallabeth
bd256b91bc Fixed disabling of AVC444 mode if requested 2021-07-01 11:56:17 +02:00
Armin Novak
8ef57bf296 Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
Armin Novak
5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak
31862e60f9 Added missing return checks 2021-06-16 11:46:42 +02:00
Armin Novak
880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00
Armin Novak
d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Armin Novak
61d380943d Added bounds check in rdpgfx_recv_wire_to_surface_1_pdu 2021-03-12 10:52:04 +01:00
akallabeth
f346793970 Refactored encoder functions to return changed areas 2021-03-01 11:52:07 +01:00
akallabeth
51811a369f Fixed missing stream length checks. 2020-11-20 09:39:25 +01:00
Armin Novak
75aab487e2 Added duplicate initialization check for plugins. 2020-08-10 16:17:44 +02:00
akallabeth
4039370064 Fixed input sanitation in rdpgfx_recv_solid_fill_pdu
The input rectangle must be checked for plausibility.

Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
2020-07-20 14:11:36 +02:00
akallabeth
cac8c365f2 Reset pointer to NULL after free. 2020-05-20 15:10:08 +02:00
Vladyslav Hordiienko
15245c2abd fix typo in GFX logs 2020-05-18 10:56:40 +02:00
akallabeth
64ad42b95b Fixed DestroyListener arguments and call order 2020-05-13 17:11:17 +02:00
akallabeth
2f5e5359f6 Destroy channel listeners on terminate 2020-05-12 11:40:42 +02:00
Kobi Mizrachi
929457db4c egfx: client: add missing NULL checks 2020-03-09 08:28:40 +01:00
Armin Novak
5690780bdd [RDPEGFX] checks for cache import, prevent 0 size allocations 2020-03-06 12:28:21 +01:00
Armin Novak
35d7e896ae Fix GFX cache eviction, use 1 based indexing. 2020-03-04 11:01:23 +01:00
Martin Fleisz
174832150e
Merge pull request #5932 from nfedera/fix_gfx_bitmapcache_indexing
Fix RDPEGFX bitmap cache indexing
2020-03-04 09:31:52 +01:00
Norbert Federa
17e0d25104 dynvc/client: fix and improve channel closing code
- fixed and consolitate the duplicated code for sending the
  CLOSE_REQUEST_PDU to the server into dvcman_close_channel
- call dvcman_close_channel if a dynamic channel plugin fails
  to process the received channel data
- rdpegfx: don't try to remove a non-existing cache entry,
  return an error instead which now will close the channel, as
  expected by Microsoft's windows protocols test suite
2020-03-04 08:03:56 +01:00
Norbert Federa
39e12990e8 rdpegfx: rename MaxCacheSlot to MaxCacheSlots
Although Microsoft uses 1-based numbering on the wire for indexing the
GFX bitmap cache entries, the code in FreeRDP uses 0-based numbering and
therefore the name MaxCacheSlots is less confusing.
2020-03-02 09:55:25 +01:00
Norbert Federa
f4d5ec776f rdpegfx: use 1-based indexing for bitmap cache
Weird but Microsoft uses 1-based indexing in the RDPGFX bitmap
cache PDU's.

This does not seem to be documented but can be deducted from the
RDP client test code in Microsoft's "Windows Protocol Test Suites"
GitHub repository and the observation that mstsc aborts with a
protocol error if the cacheSlot index value 0 is used in e.g. a
GFX surface to cache PDU.
2020-03-02 09:55:25 +01:00
Armin Novak
03e2106f25 Fixed accidental reorder of surface delete and disconnect 2020-01-16 15:24:55 +01:00
Kobi Mizrachi
18be21a4fa rdpgfx: client: fix leak when using rdpgfx_client_context_new API 2020-01-13 13:41:44 +01:00
Kobi Mizrachi
3f9e6ca978 rdpgfx: surface_to_scaled_window: fix pdu type 2019-12-12 11:10:44 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
kubistika
bf2e1a33d0 channels: rdpgfx: export API to create rdpgfx client 2019-10-24 12:19:31 +02:00
Armin Novak
f93d625cde Use GetTickCount64 instead of GetTickCountPrecise. 2019-09-02 15:46:36 +02:00
kubistika
bf618fb929 rdpgfx/client: Update gfx->UnacknowlegedFrame correctly 2019-06-06 10:24:27 +03:00
kubistika
49e7c5ddc0 rdpgfx/server: Fix formatting: rdpgfx_recv_cache_import_offer_pdu 2019-06-06 07:53:34 +03:00
kubistika
bf97d3e041 rdpgfx/client: Expose QoeFrameAck 2019-06-06 07:53:34 +03:00
kubistika
98e09af2ff rdpgfx/client: Implement CacheImportOffer PDU 2019-06-06 07:53:34 +03:00
kubistika
e2eeb9f870 rdpgfx: Add WITH_DEBUG_RDPGFX option 2019-06-04 10:29:05 +03:00
Armin Novak
f22b77d49c Fixed GFX flags and CapsConfirm return checks 2019-05-09 12:46:10 +02:00
Armin Novak
48a12ae131 Fixed memory leak and return values in rdpgfx_recv_caps_advertise_pdu 2019-05-08 12:05:58 +02:00
Armin Novak
7b2608a938 Added gfx capability filter option.
With this new option it is possible to selectively disable certain
GFX capability versions. This way buggy behaviour can be addressed
at runtime.
2019-05-08 11:43:22 +02:00
Armin Novak
1bb933b991 Fixed missing argument checks.
The arguments for rdpgfx_send_frame_acknowledge_pdu must be checked
as in some call stacks they might be NULL.
2019-05-07 13:46:24 +02:00