Commit Graph

2639 Commits

Author SHA1 Message Date
akallabeth d73d0d4610 Use defines for echo channel 2022-01-19 09:24:57 +01:00
akallabeth 6ef65b97aa Fixed const warnings audin/winmm 2022-01-19 09:24:57 +01:00
akallabeth bf19c925c2 Fixed 7526: Crash in RDPEI channel 2022-01-13 16:44:39 +01:00
akallabeth f8758a4b10 Fixed const warning in opensl es backend 2022-01-11 14:32:18 +01:00
akallabeth b4d28ab569 Fixed file name pattern checks in freerdp_channels_list_dynamic_addins
Reported by George Zaytsev from Positive Technologies
2022-01-11 14:32:18 +01:00
Armin Novak 3c72cc3306 Refactored rdpdr and dependent channels
* Move parsing code to core library
* Move definitions to public API to allow access from outside
* Move smartcard related parsing to core library
2022-01-11 12:34:43 +01:00
akallabeth 8c543b1de2 Added smartcard emulation layer 2022-01-11 12:34:43 +01:00
kubistika 4dd1747e21 rail: client: fix memory leak 2022-01-10 08:02:05 +01:00
Richard Markiewicz 16202322d1 freerdp: add audin channel for iOS 2021-12-21 08:31:04 +01:00
Armin Novak 0fb83a304d Adjusted channelID and server SetVolume data types 2021-12-20 08:11:00 +01:00
akallabeth 4a4d783d4f
Moved clipboard custom context checks to implementation (#7501) 2021-12-17 13:47:20 +01:00
Armin Novak 83f56bd565 Cleanup disp_send_display_control_monitor_layout_pdu 2021-12-17 10:06:54 +01:00
Richard Markiewicz 49f9f5c265 freerdp: remove SetFormat from iOS rdpsnd entry points, fix const-ness of interface methods 2021-12-16 08:49:49 +01:00
Armin Novak fe4c30fc54 Fixed warning in rdpgfx server channel 2021-12-14 13:46:34 +01:00
Armin Novak b2a6740d88 Added remdesk version check 2021-12-14 13:46:34 +01:00
Armin Novak 298c0f52db Fixed missing return check 2021-12-14 13:46:34 +01:00
Armin Novak e07bd77507 Fixed missing return check 2021-12-14 13:46:34 +01:00
Armin Novak b598a7b2a3 Remove failed redirected device from list 2021-12-14 13:46:34 +01:00
Armin Novak 223da39eac Updated RDPDR version checks 2021-12-14 13:46:34 +01:00
Martin Fleisz 7adf2f0bbd drdynvc: Prevent opening an already opened dynamic channel 2021-12-03 09:57:09 +01:00
Armin Novak ed73cf0d17 Added libusb transfer cancel hack 2021-11-29 09:30:10 +01:00
Armin Novak bae23de82f Fixed issues with libusb device unref 2021-11-29 09:30:10 +01:00
akallabeth b73ce8a9f6 Fixed warning in mac audin backend. 2021-11-25 12:25:18 +01:00
Armin Novak e80c24e837 Fix printer backend reference count 2021-11-18 14:17:25 +01:00
Armin Novak 8c74de191c Fix printer reference count 2021-11-16 08:27:24 +01:00
Armin Novak 239a3872d2 Fixed cups default printer. 2021-11-16 08:27:24 +01:00
Armin Novak 422b684957 Ensure default printer for windows backend. 2021-11-16 08:27:24 +01:00
Armin Novak 46d524cbc7 windows printer cleanup 2021-11-16 08:27:24 +01:00
David Fort 67986ea298 Fix compilation with mingw
This patch addresses some issues when compiling against mingw. With these changes
FreeRDP can be compiled out-of-the box on a Ubuntu 20.04.
2021-11-15 09:23:16 +01:00
akallabeth 5ed7c10840 Fixed RDPEI_PLUGIN source
Used the wrong pointer to cast to RDPEI_PLUGIN*, corrected that.
2021-11-08 12:49:13 +01:00
Alexandru Bagu 21ca4a009d
Urbrdc fix (#7417)
* fix libusb libusb_device usage (manually unref required usb devices, versus freeing all when we still hold references to the ones we want)
* disabled detach_kernel_driver & attach_kernel_driver on win32 since libusb does not support them
* fixed libusb async event handling

* add log for transfer request error

* Update libusb_udevice.c

* refactor code
2021-11-03 11:11:36 +01:00
Alexandru Bagu 3280363b66 fix call to localtime_s 2021-11-02 08:34:23 +01:00
Alexandru Bagu a8cc80851f fixes argument order for rdpdr_load_drive 2021-10-22 09:31:25 +02:00
Steve Pronovost e452467cd3 Fix protocol violation in Display Control Virtual Channel Extension
Length field of DISPLAYCONTROL_HEADER must include the size of the header
itself. See MS-RDPEDISP 2.2.1.1 DISPLAYCONTROL_HEADER.
2021-10-21 13:11:21 +02:00
Steve Pronovost bb7e4f220b Add support for graphics redirection protocol
Add support for new graphics redirection protocol (aka VAIL) used by
WSLg. This protocol is currently being documented and the official
documentation will be posted in the near future.
2021-10-21 13:11:21 +02:00
Steve Pronovost f6f4acc921 Added support for AUDIO_PLAYBACK_DVC
Support audio on dynamic channel. Please refer to MS-RDPEA.
2021-10-21 13:11:21 +02:00
Armin Novak 6e410e6dd4 Fixed broken message queue free function 2021-10-18 12:49:38 +02:00
Armin Novak 41d77cae46 Fixed /video buffer alignment, added assertions 2021-10-18 10:53:05 +02:00
Armin Novak 7d80c74e97 Cleaned up RDPDR channel interhitance
* All channels inheriting from RDPDR_DRIVE base struct
* Add functions to create/free a new device of a type
* Fixed settings array resize code, prevent 0 sizes
2021-10-18 09:21:02 +02:00
akallabeth 3ccb96d52f Fixed #7350: Warnings with Stream_StaticInit
* Properly initialize the stream buffer
* Add Stream_StaticConstInit accepting a const buffer
* Modify API to return a pointer to the stream initialized
2021-10-14 12:11:16 +02:00
akallabeth 834fdf0046
[audin] Always reset dsp_context before open (#7342) 2021-10-11 15:45:36 +02:00
Armin Novak 96cf17a45b Replaced (IWTSPlugin*) casts with struct address return 2021-10-07 16:22:04 +02:00
Armin Novak 18a3fcf2fc Updated wStream API and added torough checks
* Do length/capacity checks in every read/write/seek function
  if WINPR_ASSERT is defined.
* Ensure s->pointer is valid, e.g. within s->buffer + s->capacity
  (Stream_Rewind, Stream_Seek, ...)
* Add return values to Stream_Set* functions so inalid arguments
  can be reported to the caller
* Deprecated problematic stream manipulation functions
  (Stream_SetBuffer, Stream_SetPointer, Stream_SetCapacity)
* Ensure length/capacity functions never return a value larger
  than the actual length/capacity
2021-10-06 09:49:07 +02:00
Simon Nivault 845947651e Force one channel input fallback for audin
Windows winmm backend does not support stereo microphone properly.
Fall back to mono and ensure that fallback is used.
2021-09-30 11:15:24 +02:00
akallabeth 03a9ca80c8
Refactor proxy (#7312)
* Added hidden transport dump and replay options

* Added settings to enable transport dump and replay
* Added check in freerdp_connect to skip authentication on
  dump replay

* Fixed proxy issues

* Proper shutdown handling
* Uninitialized variables
* Skip proxy-client channels, initialize from peer channels and
  config
* Filter static channels like dynamic ones
* Added proxy module filtering from config data (channels, input, ...)

* Removed oboslete proxy decoding related files

* Added defines for RDPECAM channel

* Added proxy config options:

* VideoRedirection
* CameraRedirection

* Fixed duplicate channel free
2021-09-23 14:52:03 +02:00
akallabeth e0a531f728
Channel fixes (#7309)
* Added missing CHANNEL_NAME defines.

* Fixed FreeRDP_ChannelDefArray setter

* Fixed code duplication due to merge error

* Added public function freerdp_channels_from_mcs

* Fixed const correctness in mcs
2021-09-22 14:27:21 +02:00
akallabeth 7b7e2d6f32 Prefer constant division over multiplication for length checks 2021-09-21 08:55:22 +02:00
Armin Novak cbd30544f8 Fix rdpsnd number of event handles 2021-09-20 10:59:59 +02:00
akallabeth 5b78d02d5d Fixed unchecked variable access 2021-09-20 10:59:59 +02:00
akallabeth a3a935283b Fixed invalid read in rdpdr 2021-09-20 10:59:59 +02:00
akallabeth 1ca7e1f7a0 Added option to disable graphics decoding in client code path 2021-09-20 10:59:59 +02:00
Pascal Nowack b3ae8cec8d rdpei/server: Fix PDU length for RDPINPUT_PROTOCOL_V300
When the server supports the protocol version RDPINPUT_PROTOCOL_V300,
the additional supportedFeatures field will be present.
The pduLength in the RDPINPUT_HEADER should, however, reflect this.

So, fix this error by writing the correct PDU length when the
supportedFeatures field is present.
2021-09-20 08:41:03 +02:00
akallabeth 00c083a854 Fixed compilation warnings. 2021-09-14 09:45:03 +02:00
akallabeth 1904020d7f
Some code cleanups and WINPR_ASSERT (#7281) 2021-09-10 09:06:35 +02:00
Armin Novak 673fb46836 Fixed uninitialized warnings 2021-09-10 08:16:25 +02:00
Armin Novak 0fe1e2359e Fixed all reserved-id-macro warnings 2021-09-10 08:16:25 +02:00
Armin Novak ba0da04217 Fixed compilation warnings and duplicate defines 2021-09-09 08:53:20 +02:00
Armin Novak 95ecc6929a Refactored channel error handling
* Fix WINPR_ASSERT if a client can not allocate new resources,
  terminated cleanly instead.
* Add WINPR_ASSERT for lots of channel arguments
2021-09-09 08:53:20 +02:00
Armin Novak cde002f460 Cleaned up cliprdr 2021-09-09 08:53:20 +02:00
Armin Novak f794a8c7d4 Cleaned up remdesk 2021-09-09 08:53:20 +02:00
Armin Novak 467f7c3f6a Fixed proxy ulimit graceful client disconnect 2021-09-09 08:53:20 +02:00
Armin Novak 0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
Armin Novak 4e44003832 Expose dynamic channel PDU types 2021-09-09 08:53:20 +02:00
Armin Novak 976c3c2ab9 Refactored proxy and proxy-modules:
* Split out proxy headers and moved to public API to allow external
  modules to be built.
* Split proxy into proxy library and proxy binary. The library
  can be used by other applications and provides a simple API
* Improved channel passthrough, now all channels including dynamic
  channels work.
* Extended module API to hook more events, improved module samples
* Cleaned up proxy code, removed global static variables used,
  added WINPR_ASSERT
2021-09-09 08:53:20 +02:00
akallabeth 732a4d3839 Ignore NULL pointer as rdpsnd_server_context_free argument 2021-09-06 10:11:14 +02:00
Armin Novak 413dcd3c28 Fixed RDPSND_CHANNEL_NAME
RDPSND channel is special, as it has many names.
(e.g. static channel, dynamic channel and UDP one.
Use RDPSND_CHANNEL_NAME to identify the module name instad of
RDPSND_DVC_CHANNEL_NAME
2021-08-25 13:40:47 +02:00
Armin Novak 054f0ea260 Use defines instad of channel names 2021-08-25 10:54:24 +02:00
Armin Novak 5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +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
Simon Nivault e42696bb2e
Some fixes for audin redirection (#7231)
* Fixed research for native PCM format

* Fixed compatibility detection for resampling

* dsp: Makes channel mix and encoding process use separated buffers

* Give FramesPerPacket to freerdp_dsp_context_reset function

* dsp: Fix DVI_ADPCM codec by respecting the required packet size

* Forbid mono channel in macos

* Fix audin command line channel option

* Disable ADPCM codec as it does not work

* Refactor valid native codec research

* Native codec research: Try different channels number

* Fix dsp channel mix

* Fix dsp resample
2021-08-23 14:49:28 +02:00
Armin Novak 610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak 6854c7da7e Fixed windows audio recording issues:
1. Fix recording channels to mono
2. Fix alignment of PCM data to 2 bytes
2021-07-29 15:27:24 +02:00
Armin Novak 275f9ab2f6 Added listforeach wrapper 2021-07-29 15:09:53 +02:00
Armin Novak 8a74bdb371 Fixed cast warning 2021-07-29 15:09:53 +02:00
Armin Novak 4e3a7562af Clarified log message for device redirection 2021-07-29 15:09:53 +02:00
Armin Novak da57b0b91b Fixed resource cleanup 2021-07-29 15:09:53 +02:00
Armin Novak 55592049dc WINPR_ASSERT for drive redirection 2021-07-29 15:09:53 +02:00
Armin Novak a788145519 Fixed wrong error message 2021-07-29 15:09:53 +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
Martin Fleisz 9d031012be smartcard: Fix length of output buffer in device control response 2021-07-07 11:48:56 +02:00
Martin Fleisz 6ecdd82e28 rdpdr: Fix length calculation for client name response 2021-07-07 11:48:56 +02:00
Martin Fleisz 8c0cf7cd4b rdpsnd: Fix double frees in rdpsnd context cleanup 2021-07-07 11:10:04 +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 a7f7de549a Added SuspendInput setting
Allows to disable all keyboard/mouse/multitouch input from the
client side.
2021-06-28 14:35:26 +02:00
akallabeth 0733dd3743
Fixed installation of FreeRDP-ClientTargets.cmake (#7117) 2021-06-24 11:21:44 +02:00
akallabeth 184506db4a
Fixed installation of FreeRDP-ClientTargets.cmake (#7115) 2021-06-24 10:02:02 +02:00
Armin Novak 34413d9480 Fix data write on usb channel 2021-06-23 12:05:11 +02:00
Armin Novak b11ea98772 Fixed standalone issues with cmake 2021-06-22 09:43:23 +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 b453d5e40e Fixed rdtk, uwac and winpr standalone builds 2021-06-22 08:54:18 +02:00
Armin Novak 0355bbc51f Added missing log mapping for TRANSFER_OUT_REQUEST 2021-06-21 13:27:39 +02:00
Simon Nivault c40ca6bc28 Fixed win printer 2021-06-21 11:32:57 +02:00
Armin Novak f03b074b01 Fixed warnings with missing prototypes 2021-06-18 11:32:16 +02:00
Armin Novak 8276c145e0 Fixed rdpdr related warnings 2021-06-18 11:32:16 +02:00
Armin Novak 4dfee30934 Fixed smartcard related warnings 2021-06-18 11:32:16 +02:00
Armin Novak c4c5847f81 channels: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
akallabeth 8b01c2f8ae Fixed codql warning 2021-06-17 10:35:22 +02:00
akallabeth 8d82adb28a Fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak 2e0d1cc33c Fixed integer warnings, fixed data types 2021-06-17 10:35:22 +02:00
Armin Novak 4a6517757d Fixed logging macro warnings 2021-06-17 10:35:22 +02:00
Armin Novak 5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak 3cf90a4572 Fixed va_arg uninitialized warnings 2021-06-16 15:21:56 +02:00
Armin Novak 19dd3f6703 Fixed compilation warnings 2021-06-16 14:26:06 +02:00
Armin Novak ccfe0c129e Removed checks already done by WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak 31862e60f9 Added missing return checks 2021-06-16 11:46:42 +02:00
Armin Novak c2bef2bfa9 Fixed return value checks for ArrayList_Append and HashTable_Insert 2021-06-16 11:46:42 +02:00
Armin Novak d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak a1c8e4cf85 Refactored ArrayList_Add to conform to other functions 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 cb642699c8 Modified HashTable API to be opaque
* Reuse wObject function pointers
* Add missing getters/setters
* Clean up return types, const correctness of arguments
2021-06-16 11:46:42 +02:00
Armin Novak d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
akallabeth 31fb2ddc1a
Fixed RDPEI orientation value passing (#7069) 2021-06-01 16:15:41 +02:00
Biswapriyo Nath 173ab04b59 Use same data types as calling function prototypes. 2021-05-31 13:38:19 +02:00
Biswapriyo Nath 4c9754b269 Read from QuadPart from LARGE_INTEGER variables. 2021-05-31 13:38:19 +02:00
David Fort d76c8470b1
Merge pull request #7066 from akallabeth/rdpei_crash_fix
Stop rdpei thread before cleaning up listener
2021-05-31 13:19:44 +02:00
Armin Novak 7467f599b9 Stop rdpei thread before cleaning up listener 2021-05-31 11:44:34 +02:00
akallabeth 6b36c6d417
Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
Marc-André Moreau 841d019565 fix broken channel include path 2021-05-31 11:10:14 +02:00
Armin Novak 51919af2d6 Add more information to urbdrc log entries 2021-05-28 09:39:34 +02:00
Armin Novak 268bc2e8ef Updated RDPEI channel API
* Added new function pointers to cancel a pending operation
* Added new function pointers to send custom event flags
* Added exposed feature mask to disable channel features
2021-05-20 15:20:18 +02:00
akallabeth 566f47f63b Fixed compilation warnings. 2021-05-11 08:32:18 +02:00
akallabeth b494a193db Refactored certificate API:
* Proper encapsulation
* known_hosts2 backend extended (storing PEM)
* New backend storing each host certificate in a file
2021-05-11 08:00:18 +02:00
akallabeth ab49694101 Added new RDP file options 2021-05-11 07:59:05 +02:00
Ondrej Holy 892cbe3261 Fix various memory leaks reported by Coverity
Covscan report contains various memory leak defects which were marked
as important. I have spent some time analyzing them and although they
were marked as important, most of them are in error cases, so probably
nothing serious. Let's fix most of them anyway. The rest are false
positives, or too complicated to fix, or already fixed in master, or
simply I am unsure about them.

Relates: https://github.com/FreeRDP/FreeRDP/issues/6981
2021-04-27 14:25:20 +02:00
akallabeth 44e7531847 Improved RAIL order debug messages 2021-04-02 09:54:07 +02:00
sss 6b76ac9545 Revert "Revert "allow to use in single threaded mode" (#6864)"
This reverts commit f7465af44f.
2021-03-26 11:50:45 +01:00
akallabeth fab649a1b9 Fixed return length check for SCardGetAttrib 2021-03-20 14:31:56 +01:00
akallabeth bb6c1ed8a4
Fixed #6882: Use default output device on mac (#6893) 2021-03-12 11:17:37 +01:00
Armin Novak 61d380943d Added bounds check in rdpgfx_recv_wire_to_surface_1_pdu 2021-03-12 10:52:04 +01:00
akallabeth b8a8ae4622
Fixed mac issues with smartcard context cleanup (#6890) 2021-03-12 08:56:23 +01:00
Armin Novak d039a1ac8f Filter RDPDR types other than drives on windows hotplug 2021-03-09 13:58:28 +01:00
akallabeth 4599dc0a60 Check smartcard_convert_string_list for NULL string
In #6821 it has been reported that there are buggy smartcard
drivers that report a string size but fail to allocate the string
itself. This check avoids a crash with such input parameters
2021-03-09 10:20:42 +01:00
Denis 8ba1dc49da fix formating with clang-format 2021-03-08 13:11:50 +01:00
Denis b3a2042103 Add support for OpenBSD sndio 2021-03-08 13:11:50 +01:00
akallabeth f7465af44f
Revert "allow to use in single threaded mode" (#6864)
This reverts commit bee2e1526d.
2021-03-05 13:02:38 +01:00
akallabeth d0dacf6336
Parse on a copy of the argument string for printer (#6860)
If done on original the wrong backend is loaded on autoreconnect
2021-03-04 15:49:05 +01:00
Armin Novak c890db30c7 Fixed smartcard_convert_string_list with 0 length 2021-03-03 11:57:26 +01:00
Armin Novak 1cd97c3270 Added API check to allow compilation/run with mac os < 10.14 2021-03-02 10:03:41 +01:00
akallabeth 71c2c3102c Fixed format string in smartcard_trace_state_return 2021-03-02 08:03:35 +01:00
akallabeth f346793970 Refactored encoder functions to return changed areas 2021-03-01 11:52:07 +01:00
akallabeth 50acf72615 Refactored H264 encoding/decoding
Use YUV primitives now for all H264 operations
2021-03-01 11:52:07 +01:00
sss 6574fdf6e4 reverted changes from clang-format 2021-02-25 14:05:40 +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
akallabeth 59377fce5e Fixed smartcard crash on error return (invalid length) 2021-02-18 16:49:19 +01:00
akallabeth e2fd9db0b5 Added const to function arguments 2021-02-17 11:29:56 +01:00
Armin Novak 4b7208fb6e Always return data on SCardGetStatusChange
If the call fails just return empty data for each reader.
2021-02-10 10:36:51 +01:00
akallabeth bad20340cc Fixed issue with GetAttr where the result buffer was not allocated 2021-02-10 10:36:51 +01:00
akallabeth 14d5ad0d79 Fixed GetAttrib return length 2021-02-10 10:36:51 +01:00
akallabeth b0c11ebd91 Fixed smartcard_unpack_reader_state, allow empty names 2021-02-10 10:36:51 +01:00
akallabeth 8217f5a9e3 Fixed SCardTransmit return 2021-02-10 10:36:51 +01:00
akallabeth f693a60ec2 Unified smartcard call data structs 2021-02-10 10:36:51 +01:00
akallabeth 6cf5ba4736 Unified smartcard handle converstion 2021-02-10 10:36:51 +01:00
akallabeth 09d2806ac6 Fixed various return values in case of result != SCARD_S_SUCCESS 2021-02-10 10:36:51 +01:00
akallabeth 5fc24ef408 Fixed GetAttrib call 2021-02-10 10:36:51 +01:00
akallabeth 2767940891 refactored smartcard allocations 2021-02-10 10:36:51 +01:00
akallabeth b049265203 Fixed SCard debug WCHAR string lengths 2021-02-10 10:36:51 +01:00
Martin Fleisz 95b7f3b46d
Merge pull request #6762 from akallabeth/drive_hotplug_fix
Fixed drive hotplug path comparison.
2021-01-27 11:30:02 +01:00
Armin Novak c7bf33aad0 Fixed drive hotplug path comparison. 2021-01-27 09:27:08 +01:00
akallabeth 082b4b59d3 Fixed SCardGetAttrib pbAttr=NULL argument
If fpbAttrIsNULL!=0 set pbAttr NULL on call to SCardGetAttrib
2021-01-26 13:33:27 +01:00
akallabeth f3dad4106a Fixed support for huge files in clipboard 2021-01-25 08:43:46 +01:00
Martin Fleisz b092ab3b85 channels/smartcard: Fix race in channel cleanup 2021-01-22 09:49:56 +01:00
akallabeth 9e8d3fbbf5 Check drive to hotplug for already being redirected
some hotplug implementations report the same drive multiple times.
to avoid redirecting the same drive multiple times check if it is
already in the list before adding.
2021-01-15 10:41:12 +01:00
akallabeth 12427f006f Fixed linking dependencies for client geometry channel 2020-12-08 14:01:06 +01:00
akallabeth 4d1a7cf5fa Renamed RDPEI flags due to problems with windows headers 2020-11-30 13:54:33 +01:00
akallabeth d9d22aa422 Fixed sound buffering issues with compressed formats 2020-11-26 15:26:35 +01:00
Armin Novak d493cf6f07 Cleaned up rdpei channel, updated to current spec. 2020-11-23 10:29:47 +01:00
Martin Fleisz a5fce9e64b channels/audin: Request correct media type in audin channel on Mac 2020-11-20 15:37:19 +01:00
akallabeth 51811a369f Fixed missing stream length checks. 2020-11-20 09:39:25 +01:00
akallabeth d11422b6b8 Added missing include. 2020-11-18 07:18:25 +01:00
Martin Fleisz c78e31e451 channel/rdpdr: Fix hotplug for drive redirection on Windows
The path was incorrectly cut of after the drive letter causing hot
plugged drives to show up empty and disconnecting the client if the
device was removed later on.
2020-11-13 12:26:29 +01:00
akallabeth 2e5280feec Fixed possible out of bound access in usb channel. 2020-11-10 09:02:35 +01:00
akallabeth 66dc4cc9ee Fixed compilation warnings. 2020-11-10 08:53:43 +01:00
akallabeth 7f1cca78aa Clean up drdynvc channels porperly locked. 2020-11-06 13:38:47 +01:00
akallabeth 6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Martin Fleisz 80cba204c0
Merge pull request #6521 from akallabeth/mac_fixes
Mac fixes
2020-10-28 09:55:20 +01:00
akallabeth 6e5f5de439 Do not abort disc hotplug if no access to mount tab. 2020-10-27 15:45:56 +01:00
akallabeth 55b95769d0 Fixed #6518 2020-10-21 19:48:27 +02:00
Armin Novak 0e0eb5f41f Added permission checks for mac audio backend. 2020-10-21 19:44:09 +02:00
akallabeth e4243bb33c Corrected clipboard capability mask 2020-10-02 13:17:00 +02:00
Ilya Shipitsin b62da2cbcc channels/disp/client/disp_main.c: fix possible null pointer dereference
found by cppcheck

channels/disp/client/disp_main.c:340:7: warning:
Either the condition 'if(disp&&disp->listener_callback)' is redundant or
there is possible null pointer dereference: disp. [nullPointerRedundantCheck]
2020-10-02 09:58:03 +02:00
akallabeth f282c55c7a Added clipboard CB_HUGE_FILE_SUPPORT_ENABLED flag 2020-09-29 09:03:49 +02:00
akallabeth 1546a8b655 Fixed naming of FILEDESCRIPTORW 2020-09-18 12:49:54 +02:00
Felix Deimel 19f74a2698
Fixes #5747: Only activate sound output device (#6467)
* Fixes #5747: Only activate sound output device
2020-09-08 10:55:49 +02:00
akallabeth 6f00308db7 Fixed short length for usb io control return. 2020-08-13 13:51:38 +02:00
Armin Novak 6ce0517593 Manually free up libusb transfer data to avoid double free 2020-08-12 10:34:58 +02:00
Armin Novak 81d59b2d47 Fixed double free on channel close in channel write. 2020-08-12 10:10:18 +02:00
Martin Fleisz 2d715e4681
Merge pull request #6429 from akallabeth/channel_init_check
Added duplicate initialization check for plugins.
2020-08-11 14:34:07 +02:00
Martin Fleisz 1e7330b861
Merge pull request #6363 from akallabeth/urbdrc_double_free_fix
[URBDRC] Added return checks for replaced HashTable with ArrayList
2020-08-11 14:33:17 +02:00
akallabeth 786f6bbfe8 Fixed missing async user data extraction from libusb transfer 2020-08-11 14:12:36 +02:00
Armin Novak 75aab487e2 Added duplicate initialization check for plugins. 2020-08-10 16:17:44 +02:00
Armin Novak 93ee13245c Fixed urbdrc server notification of channel close
There was a recursion issue with usb device channel closing and
local redirected device removal.
If the local redirected device is removed due to hotplug events,
the device channel needs to be closed, which in turn checks if
the local device list contains the device. Ensure that the
channel close code is only executed when not called from the
channel side.
2020-08-10 13:40:41 +02:00
akallabeth dbeaa614d6 Removed channel close in USB channel done after channel is freed 2020-08-10 13:34:30 +02:00
akallabeth 8c859575cf Fixed access to user_data after free 2020-08-10 13:34:30 +02:00
akallabeth 54c92e78e6 Fixed invalid buffer length and duplicated write function. 2020-08-10 13:34:30 +02:00
akallabeth e7533130a6 Fixed urbdrc arraylist locking 2020-08-10 13:34:30 +02:00
Armin Novak 28bc636d53 Unified streamID read/write 2020-08-10 13:34:30 +02:00
Armin Novak 3ebc71abf3 Replace wHashTable with wArrayList in USB channel
The streamID is not guaranteed to be uniqe, so add all transfers
to a list and remove by checking pointers instead of the streamID
2020-08-10 13:34:30 +02:00
Armin Novak ea8f93441d Added return checks for HashTable_Add 2020-08-10 13:34:30 +02:00
Armin Novak 57b405ca26 Fixed compilation warnings. 2020-08-10 12:14:11 +02:00
Alexandr 616af2d5b8
fixed build on freebsd (#6395)
* fixed build on freebsd
2020-07-27 11:36:24 +02:00
Zhu Qun-Ying 2ba7f9da1d cliprdr_common.c: fix memory leak in certain error condition 2020-07-25 16:55:34 +02:00
Zhu Qun-Ying 2a286fbf65 Fixed error msg typo in ciprdr_main.c 2020-07-25 16:55:21 +02:00
Marco van Wieringen 9db147c317 Add support for getmntent support on Illumos
This implements reading mount entries on Solarish operating systems like
OpenIndiana etc using the somewhat different getmntent support available
there.
2020-07-24 09:16:46 +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
Kobi 5667c12be5
Merge pull request #6360 from kubistika/proxy_rail_handshake_ex_flags_sync
server: proxy: rail: handshake ex flags sync
2020-07-07 15:54:08 +03:00
Kobi Mizrachi 004c2f49e4 rail: server: add API to set railHandshakeExflags 2020-07-07 15:31:20 +03:00
Armin Novak 8cee10319a Fixed urbdrc device path 2020-07-07 10:43:08 +02:00
Armin Novak 6efc72707c Fixed bDeviceClass check in udev_init
Use the proper constant  0xef (Miscellaneous) instead of
0xfe (Application Specific)
See https://www.usb.org/defined-class-codes
2020-07-07 10:43:08 +02:00
akallabeth bc7d423c6c Replaced malloc in urbdrc channel 2020-07-07 10:43:08 +02:00
akallabeth 804891c0e8 Fixed discrepancy in string descriptor default 2020-07-07 10:43:08 +02:00
akallabeth 37a5a7a157 Replaced memset in urbdrc 2020-07-07 10:43:08 +02:00
akallabeth 29e3b0ea51 Unified logging for urbdrc libusb wrapper 2020-07-07 10:43:08 +02:00
akallabeth 66e4eb628b Initialize variable in func_instance_id_generate 2020-07-07 10:43:08 +02:00
akallabeth 8ee0fafa09 Improved error log for string descriptor read issues 2020-07-07 10:43:08 +02:00
akallabeth 2a493a58a8 Reverted check for short usb descriptor 2020-07-07 10:43:08 +02:00
akallabeth 2d95224488 Added compile time urbdrc debug option 2020-07-07 10:43:08 +02:00
akallabeth fc8c07435f Dump USB channel data with log-level trace 2020-07-07 10:43:08 +02:00
Kobi Mizrachi ec06a98e84 rail: server: rename rail_send_pdu -> rail_server_send_pdu 2020-07-06 10:32:59 +03:00
Kobi Mizrachi 5438b94c97 rail_common.c: Fix rail_get_order_type_string 2020-07-06 08:46:14 +03:00
Kobi Mizrachi c3b28e8bce rail: server: mark rail_send_pdu as static function 2020-07-06 08:27:13 +03:00
akallabeth b971c5c97f Use CMake to detect availability of getlogin_r 2020-07-01 16:50:20 +02:00
akallabeth caff01877d Fixed fallback to getlogin for android 2020-06-22 12:09:36 +02:00
akallabeth 1c6a6923f8 Fixed broken const variable. 2020-06-22 11:51:39 +02:00
akallabeth c3a1ed780c Use localtime_s on windows 2020-06-22 11:51:38 +02:00
akallabeth 1a02af5a12 Fixed codition with side effects 2020-06-22 11:51:38 +02:00
akallabeth 36478d3d0b Replaced getlogin with getlogin_r 2020-06-22 11:51:38 +02:00
akallabeth 240fdd07b1 Replaced localtime with localtime_r 2020-06-22 11:51:38 +02:00
Bernhard Miklautz 1628939227 fix [client channels]: move exported API calls to client/common
The functions mappedGeometryRef and mappedGeometryUnref are API
functions ([1]) but were implemented in the geometry channel.
In case FreeRDP was built with BUILTIN_CHANNELS=OFF those functions
weren't available globally but used by the video channel.

Now the functions are fixed part of the freerdp-client library and
therefore available for all channels.

[1] exported in freerdp/client/geometry.h

Fixes #6236
2020-06-17 12:59:41 +02:00
Martin Fleisz 982bc682b5
Merge pull request #6256 from akallabeth/usb_cancel_fix
Do not remove transfer data on usb cancel transfer
2020-06-16 11:05:24 +02:00
Kobi 67d4560e86
Merge pull request #6259 from kubistika/drdynvc_hotfix
drdynvc: client: fix #6252 use-after-free
2020-06-04 21:29:19 +03:00
akallabeth 5c0ccb7575 Fixed formatting. 2020-06-04 07:55:12 +02:00
Ondrej Holy c03f68059d smartcard: Teoretical fix of uninitialized values
This tries to fixes the following defects reported by covscan tool:
 - channels/smartcard/client/smartcard_operations.c:958: uninit_use_in_call: Using uninitialized value "ret.cReaders" when calling "smartcard_pack_locate_cards_return".
 - channels/smartcard/client/smartcard_operations.c:932: uninit_use_in_call: Using uninitialized value "ret.cReaders" when calling "smartcard_pack_locate_cards_return".

But I am not sure about it...
2020-06-04 07:55:12 +02:00
Ondrej Holy 7554154a04 smartcard: Fix usage of uninitialized values
This fixes the following defect reported by covscan tool:
 - channels/smartcard/client/smartcard_pack.c:942: uninit_use_in_call: Using uninitialized value "tmp" when calling "ConvertFromUnicode".
 - channels/smartcard/client/smartcard_pack.c:894: uninit_use_in_call: Using uninitialized value "tmp" when calling "ConvertFromUnicode".
 - channels/smartcard/client/smartcard_pack.c:475: uninit_use_in_call: Using uninitialized value "tmp" when calling "ConvertFromUnicode".
2020-06-04 07:55:12 +02:00
Kubistika 6ed765c960 drdynvc: client: fix #6252 use-after-free 2020-06-03 19:47:40 +03:00
Armin Novak 5ec66cc6c7 Fixed sign compare warnings with constants. 2020-06-03 09:53:18 +02:00
Armin Novak ef4de12887 Fixed double free in urb_isoch_transfer_cb 2020-06-03 08:37:45 +02:00
Armin Novak a5e2d62e48 Do not remove transfer data on usb cancel transfer 2020-06-03 08:24:17 +02:00
Patrick Chin 5f788c65f4 Fix memory leaks in client/encomsp_main.c and client/remdesk_main.c 2020-06-02 09:50:07 +02:00
Florian Staudacher d1dc2fb03d report only actual bytes received, not allocated buffer size (interrupt produces data, timeout doesn't) 2020-06-02 09:21:30 +02:00
Florian Staudacher 03128d5154 only call 'libusb_set_interface_alt_setting' when value is changed 2020-05-29 10:48:23 +02:00
Armin Novak 539e3e9fc5 Fixed memory leak in rdpei 2020-05-25 08:43:03 +02:00
akallabeth cac8c365f2 Reset pointer to NULL after free. 2020-05-20 15:10:08 +02:00
akallabeth a1eb3e66b3 Clear dynamic channel lists on disconnect. 2020-05-20 15:10:08 +02:00
akallabeth 58ef235bc5 Removed unused variable warnings 2020-05-20 15:10:07 +02:00
akallabeth 9909ed57ae Fixed rails debug string warnings. 2020-05-20 15:10:07 +02:00