Commit Graph

374 Commits

Author SHA1 Message Date
Gluzskiy Alexandr
bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
akallabeth
43311130a2 Fixed CodeQL warnings 2021-02-19 11:19:49 +01:00
akallabeth
da938a6514 Only update destination rect for SurfaceToSurface and SurfaceToCache 2021-02-16 16:44:41 +01:00
Armin Novak
65647d5763 Use separate codec contexts for legacy and GFX 2021-02-10 10:38:24 +01:00
Vic Lee
a1566574a3 progressive: fix multiple regions in one gfx frame. 2021-02-04 09:16:23 +01:00
Armin Novak
8187ab7732 Fix ColorFidelity use 2021-01-18 09:41:13 +01:00
akallabeth
130561c9fc Removed size change check from DesktopResize
Just pass on every reset event from the server, the callback might
need to reset internal state even if the resolution did not change.
2020-12-22 13:00:54 +01:00
kubistika
50c09db081 reset codecs in gdi_pipeline_init 2020-12-01 13:10:45 +01:00
akallabeth
e08a23f931 Fixed missing input sanitation for GFX surfaces.
Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
2020-07-20 14:11:36 +02:00
akallabeth
f753c25ad3 Reset freed HGDI_DC
CVE-2020-4031 thanks to @antonio-morales for finding this.
2020-06-22 11:51:39 +02:00
Ondrej Holy
230d83b319 gdi: Fix missing unlock
This fixes the following defect reported by covscan tool:
libfreerdp/gdi/gfx.c:144: missing_unlock: Returning without unlocking "update->mux".
2020-06-04 07:55:12 +02:00
akallabeth
a9daba0190 Check for int overflow in gdi_InvalidateRegion 2020-04-09 18:00:51 +02:00
akallabeth
a3996af062 Refactored gdi region
* Added a unit test
* Fixed const correctness of function arguments
* Added return values for all functions
2020-04-09 18:00:51 +02:00
akallabeth
b677b5db25 Proper error return from gdi_rect_str and gdi_regn_str 2020-04-09 18:00:51 +02:00
akallabeth
e075f348d2 Added debug logging and claping to all region functions 2020-04-09 18:00:51 +02:00
akallabeth
ce21b9d7ec Fix CVE-2020-11523: clamp invalid rectangles to size 0
Thanks to Sunglin and HuanGMz from Knownsec 404
2020-04-09 18:00:51 +02: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
ceb015a6bb egfx: the gfx reset grahics pdu is optional
Since the EGFX Reset Graphics PDU seems to be optional,
the graphicsReset variable (which is updated in that PDU's handler)
should be removed from the rdp_gdi struct with the next change
in public headers (as in freerdp v3).
There are still some clients that expect and check it and therefore
we keep it for now, initialized with TRUE.

sdas
2020-02-26 13:57:12 +01:00
Kobi Mizrachi
2d9a50fafb fix memory leaks in disp server and gfx.c 2020-01-13 13:41:44 +01:00
Martin Fleisz
71feb974ac
Merge pull request #5739 from akallabeth/improve_function_hiding
Improve function hiding
2019-12-02 11:31:35 +01:00
Armin Novak
7c243da6e1 Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
Armin Novak
c7337f4b6b Added data length check for RDP_CODEC_ID_NONE 2019-11-28 08:08:30 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
f01e042211 Code cleanups (strlen, casts, size_t, ...) 2019-10-29 11:58:43 +01:00
Armin Novak
5cdb7b7bea Fix gdi coordinate clamping. 2019-10-25 12:58:14 +02:00
asapelkin
82eadad4a4 Fix some static analizer warnings 2019-10-22 15:39:54 +02:00
Armin Novak
441fb4d0ca Allow freerdp clients to function with WITH_OPENH264_LOADING
If no library can be loaded at runtime ignore H264 capabilities.
This allows a build with only OpenH264 support and dynamic loading
enabled to function when no openh264 library was detected.
2019-10-07 09:31:20 +02:00
Armin Novak
d49adfcf59 Fixed warnings and cleaned up gfx related xfreerdp code. 2019-05-08 17:01:36 +02:00
Martin Fleisz
50566c2171
Merge pull request #5385 from akallabeth/some_unused_parameter_silenced
Some unused parameter silenced
2019-05-08 14:16:05 +02:00
Martin Fleisz
e4a9172e13
Merge pull request #5383 from akallabeth/gfx_spec_update
Updated GFX to 10.6 spec
2019-05-08 13:42:50 +02:00
Armin Novak
ca4a1d19a5 Silenced some unused parameter warnings. 2019-05-08 12:21:31 +02:00
Armin Novak
3d1cec894c Fixed alignment requirements for surface sizes. 2019-05-08 10:36:00 +02:00
Armin Novak
3b7e46fb0e Updated GFX to 10.6 spec 2019-05-07 12:10:13 +02:00
Armin Novak
2a26aa0d87 Unified update->BeginPaint and update->EndPaint
Since these functions were called from 2 different threads
(main thread or dynamic channel) depending on fastpath or
gfx channel use lock between these.
If not locked the invalid region may be accessed from both
threads and lead to crashes as experienced with nightly df280a7ff
2019-04-11 15:33:23 +02:00
Armin Novak
ba40c971d2 Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak
696390f027 Fixed missing return value check. 2019-04-05 09:13:24 +02:00
Armin Novak
e8c8e7b6d0 Updated EGFX support to 10.6 2019-02-27 16:36:15 +01:00
Armin Novak
0c13c3199e Follow up to #4959: Lock gdi_UpdateSurfaces like xf_UpdateSurfaces 2018-12-04 16:56:22 +01:00
Armin Novak
2e019b2fd1 Implemented GFX locking and enforce return value checks.
To fix #4825 GFX functions must now aquire a lock before accessing surfaces.
This prevents simultaneous update of internal data by client and gfx threads.
Also enforce return value checks, where not already done.
2018-11-29 11:55:27 +01:00
Armin Novak
d06c3980a0 Fixed error log for avc420_decompress failures. 2018-11-26 11:33:23 +01:00
Armin Novak
09b9d4f199 Fixed CVE-2018-8787
Thanks to Eyal Itkin from Check Point Software Technologies.
2018-11-20 11:08:31 +01:00
Armin Novak
3e2caa88a4 Fixed invalid NULL check 2018-11-20 09:38:02 +01:00
Armin Novak
53fdea8455 Clip coordinates for lineTo and polyLine 2018-11-19 17:25:19 +01:00
Armin Novak
d75c464dbd Fixed signed/unsigned warnings. 2018-11-19 17:25:19 +01:00
Armin Novak
75d532f87c Fixed glyph cache bounds setting. 2018-11-19 13:58:53 +01:00
Armin Novak
e94ed7d762 Fixed gdi_BitBlt coordinate clipping. 2018-11-19 12:55:50 +01:00
Armin Novak
a078d8714e Fixed opaque rect bounding rectangle. 2018-11-19 12:55:50 +01:00
akallabeth
b6eca4fc54 signed gdi regions to adjust negative coordinates 2018-11-19 12:52:43 +01:00
Armin Novak
88d310ff2c Fixed compiler warnings (casts, ...) 2018-10-18 09:09:30 +02:00
Armin Novak
a432a297ca Fixed division by 0 if invalid formats are used. 2018-10-17 11:37:51 +02:00