Commit Graph

37 Commits

Author SHA1 Message Date
akallabeth
c3a82daad6 [channels] simplified client linking 2023-03-01 08:18:34 +01:00
akallabeth
26ac2f0b27
Additional checks (#8279)
* Fix length checks in parallel driver

The length requested was not checked against the length read from
the port.

* Fixed missing length check in video channel

Data received in video redirection channel was not checked for
proper length.

* Fixed video presentation reference counter

Video channel presentation reference counter was not updated with
Video_Frame_new. A failing H264 decoding step could trigger a reference
decrement and the presentation was freed by accident.
Also clean up the increment and decrement of presentation

* Fixed tsmf ffmpeg context extra data size checks

tsmf_ffmpeg_init_stream did not abort if the video format ExtraDataSize
was not sufficiently large to satisfy expectations.

* Fixed missing input data length check

tsmf_ifman_exchange_capability_request did not check if the input
data stream actually contained the amount of bytes requested to
copy.

* Fixed TSMF tsmf_ffmpeg_set_format length checks

ExtraDataSize of format was not checked for expected minimum length

* Fixed TSMF tsmf_read_format_type length checks

ExtraDataSize of format was not checked for expected minimum
length

* Fixed TSMF tsmf_gstreamer_set_format length checks

ExtraDataSize of format was not checked for expected minimum
length
2022-10-06 15:30:54 +02:00
akallabeth
1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
David Fort
e389210673 client channels: mutualize common types between dynamic channels
Most dynamic channels share the same copied and pasted code for the XXX_CHANNEL_CALLBACK
and XXX_LISTENER_CALLBACK types. This patch introduce GENERIC_CHANNEL_CALLBACK and
GENERIC_LISTENER_CALLBACK that fits for most channels and discard custom type definitions.
2022-06-15 14:04:58 +02:00
akallabeth
ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth
cc3e28f2f1 Fixed -Wdocumentation errors 2022-04-28 11:24:51 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
akallabeth
1378c8e671
Fixed #7753: Step calculation in YUV decoder (#7758)
* Fixed #7753: Step calculation in YUV decoder

* Fixed rectangle_is_empty

* Added rectangle intersection check in YUV decoder

* Skip intersecting rectangles in YUV decoder

* Refactored YUV work object handling

* Allocate / free in yuv_context_new and yuv_context_free
* WINPR_ASSERT all function arguments

* Pass yuv_context_reset result from h264_context_reset

* Reset PTP_WORK buffer to NULL after use
2022-03-29 13:55:52 +02:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
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
41d77cae46 Fixed /video buffer alignment, added assertions 2021-10-18 10:53:05 +02:00
Armin Novak
96cf17a45b Replaced (IWTSPlugin*) casts with struct address return 2021-10-07 16:22:04 +02:00
Hans-Peter Jansen
297f965052 Fix linking, if BUILTIN_CHANNELS switched off
If -DBUILTIN_CHANNELS=OFF is supplied to cmake, auxiliary channel modules
are built as plugins, that are loaded from $LIBDIR/freerdp as shared libs.

This patch fixes the linkage of these plugins by taking inter-channel dependencies
of this separation into account. If BUILTIN_CHANNELS=ON, these channel modules
are linked directly into the main modules. Therefore, the linking of the plugins
is conditioned accordingly.
2021-08-24 08:43:01 +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
akallabeth
50acf72615 Refactored H264 encoding/decoding
Use YUV primitives now for all H264 operations
2021-03-01 11:52:07 +01:00
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
Armin Novak
75aab487e2 Added duplicate initialization check for plugins. 2020-08-10 16:17:44 +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
akallabeth
06c32f1700 Fixed int overflow in PresentationContext_new
Thanks to hac425 CVE-2020-11038
2020-05-08 11:04:03 +02:00
Armin Novak
7c243da6e1 Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
27d2a9e040 Fixed unused argument warnings. 2019-04-05 09:14:35 +02:00
Armin Novak
5612cbd8e6 Fixed dead store warnings 2019-04-05 09:14:35 +02:00
Johannes Weberhofer
277fc1ca4b
Include geometry.h in video channel
Fix for #4562
2018-04-17 08:20:54 +02:00
Armin Novak
77a9e2edfc Do not export internal variables. 2018-02-14 13:51:38 +01:00
David Fort
484abe0567 video: fix invalid geometry and invalid argument passing to time pubsub 2018-02-14 00:08:52 +01:00
Armin Novak
79d9ae8775 Fixed gemoetry mapping. 2018-02-13 10:52:53 +01:00
David Fort
73bef4ca23 video, geometry: fixed geometry handling
It was not working when moving the video window.
2018-02-13 10:52:53 +01:00
David Fort
b8e3b232de video: mutualize things in the common channel code 2018-02-13 10:52:53 +01:00
David Fort
4b240dad0e video+geometry: fixed leaks, a segfault and concurrent accesses 2018-02-13 10:51:07 +01:00
David Fort
a07efb73ec video: an implementation of MS-RDPEVOR for X11
Implements the decoding of video streams using common H264 decoders. We also implement
a trivial feedback algorithm.

Sponsored by: Rangee GmbH (http://www.rangee.de)
2018-02-13 10:51:07 +01:00
David Fort
b84839b21c video: a skeleton for MS-RDPEVOR client
Basics for implementing the client side of the MS-RDPEVOR channel.

Sponsored by: Rangee GmbH (http://www.rangee.de)
2018-02-13 10:51:07 +01:00