Commit Graph

162 Commits

Author SHA1 Message Date
Martin Haimberger 6ab0187d84 Merge remote-tracking branch 'upstream/master' into mh-channel
Conflicts:
	channels/audin/client/oss/audin_oss.c
	channels/drive/client/drive_main.c
	channels/printer/client/printer_cups.c
	channels/printer/client/printer_main.c
	channels/rail/client/rail_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	channels/rdpsnd/client/oss/rdpsnd_oss.c
	channels/remdesk/client/remdesk_main.c
	channels/remdesk/server/remdesk_main.c
	channels/tsmf/client/tsmf_media.c
2015-07-15 01:57:07 -07:00
Martin Haimberger b8c110d19b introduced channel error reporting system
The rdpContext gets an event which will
get set if an error occoured in a channel.

If a thread or a void callback has to report an
error it will get signaled by this system.
2015-07-15 00:50:35 -07:00
David FORT 7c3f8f33ab Fixes for malloc / calloc + other fixes
This patch contains:

* checks for malloc return value + treat callers;
* modified malloc() + ZeroMemory() to calloc();
* misc fixes of micro errors seen during the code audit:
** some invalid checks in gcc.c, also there were some possible
integer overflow. This is interesting because at the end the data are parsed
and freed directly, so it's a vulnerability in some kind of dead code (at least
useless);
** fixed usage of GetComputerNameExA with just one call, when 2 were used
in misc places. According to MSDN GetComputerNameA() is supposed to return
an error when called with NULL;
** there were a bug in the command line parsing of shadow;
** in freerdp_dynamic_channel_collection_add() the size of array was multiplied
by 4 instead of 2 on resize
2015-06-22 19:21:47 +02:00
Bernhard Miklautz bf73f4e4f1 Fix unchecked strdups
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Martin Haimberger e5d5cd3c94 hardend cliprdr
hardend cliprdr server and client
also updated all callbacks in the server and client
implementations
2015-06-18 03:04:31 -07:00
Norbert Federa ef1fd12b15 Fix unchecked CreateEvent calls and misc fixes
1)
Added missing checks for CreateEvent which also required the
following related changes:

- changed freerdp_context_new API to BOOL
- changed freerdp_peer_context_new API to BOOL
- changed pRdpClientNew callback to BOOL
- changed pContextNew callback to BOOL
- changed psPeerAccepted callback to BOOL
- changed psPeerContextNew callback to BOOL

2)
Fixed lots of missing alloc and error checks in the
changed code's neighbourhood.

3)
Check freerdp_client_codecs_prepare result to avoid segfaults
caused by using non-initialized codecs.

4)
Fixed deadlocks in x11 caused by missing xf_unlock_x11() calls
in some error handlers

5)
Some fixes in thread pool:
- DEFAULT_POOL assignment did not match TP_POOL definition
- don't free the pool pointer if it points to the static DEFAULT_POOL
- added error handling and cleanup in InitializeThreadpool
2015-04-29 18:18:39 +02:00
Norbert Federa 84577b1ca7 codec/rfx: error checking and various fixes
- removed some unneeded null checks for free()
- fixed a memory leak in shadow_client
- removed rfx_compose_message_header from API

Changed the following functions to BOOL, check the result
where they are called and handle failures:
- rfx_compose_message
- rfx_compose_message_header
- rfx_write_tile
- rfx_write_message_tileset
- rfx_write_message_frame_begin
- rfx_write_message_region
- rfx_write_message_frame_end
- rfx_write_message

rfx_process_message:
- check memory allocation failures
- verify protocol-conform order of data messages to prevents memory
  leaks caused by repeated allocations
- verify that header messages were parsed/received before the
  data messages
- treat unknown rlgr mode as error
- fixed/added error handling
- fixed all callers to check/handle result

rfx_encode_message:
- fixed incorrect usage of realloc
- missing malloc check
- missing check of CreateThreadpoolWork
- correct cleanup on failure (threadpool, memory)
- check rfx_encode_message result

rfx_encode_messages:
- check rfx_split_message result
- correct cleanup on failure
- prevent memory leak on failure

rfx_write_message_context:
- fixed invalid channelId value (must be 0xFF for WBT_CONTEXT)

rfx_process_message_codec_versions:
- fixed invalid read size of codec_version (it is 16bit)

rfx_process_message_channels:
- verify protocol conform channelId value

rfx_process_message_region:
- replaced invalid reallocs with malloc
- read and verify regionType and numTileSets from stream

rfx_process_message_tileset:
- check allocation results
- fixed incorrect usages of realloc

setupWorkers:
- fixed incorrect usages of realloc

rfx_split_message:
- removed dead code
- missing malloc check

rfx_compose_message:
- fixed a memory leak
- check/handle rfx_encode_message result
2015-04-23 15:42:21 +02:00
Marc-André Moreau 6afd621d4c Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
Conflicts:
	server/Mac/mf_audin.c
	server/Mac/mf_event.c
	server/Mac/mf_info.c
	server/Mac/mf_mountain_lion.c
	server/Mac/mf_peer.c
	server/Mac/mf_rdpsnd.c
	server/Mac/mfreerdp.c
	server/shadow/CMakeLists.txt
2014-09-17 20:15:01 -04:00
Marc-André Moreau 2a5192b027 Merge branch 'master' of github.com:awakecoding/FreeRDP into egfx
Conflicts:
	client/Windows/wf_cliprdr.h
	client/Windows/wf_event.h
	client/X11/xf_client.c
	client/X11/xf_gdi.c
	libfreerdp/gdi/gdi.c
	server/Mac/mf_input.c
2014-09-17 19:09:56 -04:00
Armin Novak 5b5791c8d7 Using wlog for server now. 2014-09-15 08:55:00 +02:00
Marc-André Moreau 6a1b76e42a shadow/mac: add monitor detection 2014-09-13 13:12:55 -04:00
Marc-André Moreau aa49e63cda mfreerdp-server: fix build 2014-09-13 12:33:33 -04:00
Marc-André Moreau b0d27beae3 mfreerdp: add egfx support 2014-09-13 12:02:53 -04:00
Bernhard Miklautz 0313ca3622 libfreerdp: always build "MONOLITHIC"
"libfreerdp" consisted of multiple (small) single libraries. If the cmake
option MONOLITHIC was used only one library was build combining all of
the libfreerdp-* libraries.
The only exceptions to this are libfreerdp-server and libfreerdp-client these
are build as separate libraries.

This commit obsoltes non-monolithic builds and makes monolithic builds
the default. The cmake option MONOLITHIC is also removed.
2014-09-12 00:19:53 +02:00
Marc-André Moreau e4a4aa4d3a Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
Conflicts:
	channels/encomsp/client/encomsp_main.c
	libfreerdp/core/tcp.c
	libfreerdp/crypto/certificate.c
	server/Windows/CMakeLists.txt
	server/X11/xf_cursor.c
	server/X11/xf_input.c
	server/X11/xf_interface.c
	server/X11/xf_monitors.c
	server/X11/xf_peer.c
2014-08-11 19:22:33 -04:00
Armin Novak 784696c1cd Fixed missing includes and invalid replacement. 2014-08-11 09:38:08 +02:00
Armin Novak 8d8719e101 Replaced fprintf with DEBUG_WARN 2014-08-11 09:19:47 +02:00
Armin Novak 084da200cf Replaced fprintf(stderr with DEBUG_WARN 2014-08-07 22:20:53 +02:00
Robert Lockwood b05c43c602 rdpsnd->Initialize requires two arguments
Fixes rdpsnd->Initialize() to have two arguments.  Fixes compilation on XCode 5.  To be tested.
2014-07-29 23:30:47 +01:00
Marc-André Moreau 58d83c9c1e shadow: stub Mac subsystem 2014-07-15 23:01:56 -04:00
Bernhard Miklautz 6a49bcfe40 winpr: always build "monolitic"
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.

The only exception is winpr-makecert-tool which is still build as extra
library.

This obsoletes complex_libraries for winpr.
2014-07-10 11:10:58 +02:00
Hardening f33f755635 Also specify the timestamp when sending samples
This patch complements the SendSample() callback to take the timestamp
as extra argument.
2014-06-18 23:44:34 +02:00
Marc-André Moreau 02090abc8b mfreerdp-server: fix after changes to virtual channels 2014-02-28 12:47:09 -05:00
Marc-André Moreau 8510ad3171 freerdp: remove rdpChannel definition in favor of CHANNEL_DEF 2014-02-28 12:07:22 -05:00
Marc-André Moreau 6e1cdf1b67 libfreerdp-core: expose opaque HANDLE instead of WTSVirtualChannelManager* 2014-02-27 13:30:04 -05:00
Marc-André Moreau f3011492d8 freerdp-server: remove usage of deprecated custom server-side channel API 2014-02-16 23:09:21 -05:00
Marc-André Moreau 48a2235e9e mfreerdp-server: fix compilation issue 2013-10-28 16:25:37 -04:00
Marc-André Moreau f790831e7d Merge branch 'master' of github.com:awakecoding/FreeRDP into xrdp-ng 2013-09-05 15:23:19 -04:00
Marc-André Moreau b480ce1830 freerdp: remove vendor-specific options from build system, add automatic ways of including external clients/servers 2013-09-03 20:37:04 -04:00
Marc-André Moreau 23a8354656 channels: rdpsnd refactoring, drdynvc initial server-side code 2013-08-18 21:52:55 -04:00
Marc-André Moreau 0fd705c6c7 channels/cliprdr: start server-side implementation 2013-08-16 16:46:47 -04:00
Marc-André Moreau 208c9f844a freerdp: fix core API bugs 2013-06-13 21:34:46 -04:00
Marc-André Moreau fdf3ddcf9e freerdp: purge deprecated stream utils 2013-05-08 17:48:30 -04:00
Marc-André Moreau fd230443c5 freerdp: purge old stream utils 2013-05-08 16:27:21 -04:00
Marc-André Moreau b4cac74136 xfreerdp-server: fix RemoteFX encoding 2013-05-01 18:15:55 -04:00
Marc-André Moreau 51715636a5 freerdp: remove some deprecated stream utils 2013-04-29 22:35:15 -04:00
Marc-André Moreau c65ee0c2f4 wfreerdp: fix build on Windows 2013-03-29 00:33:15 -04:00
Marc-André Moreau a318f8f129 mfreerdp: fix build on Mac OS X 2013-03-29 00:15:29 -04:00
Hardening 7701c9d934 Replace printf(...) by fprintf(stderr, ...) 2013-03-28 23:06:34 +01:00
Marc-André Moreau 8c8a82c31f libfreerdp-utils: purge old STREAM utils 2013-03-21 16:45:25 -04:00
Marc-André Moreau a8201b0d1b libwinpr-utils: combine old and new stream utils 2013-03-21 15:19:33 -04:00
Christian Hofstaedtler 3fb2469089 mfreerdp-server: don't link directly to CoreGraphics
Apparently one should link to ApplicationServices, which is a purely
transitional framework. This fixes builds with deployment target set
to 10.4 when building with the 10.8 SDK.
2013-03-11 21:22:24 +01:00
C-o-r-E 4c769bc01b rdpsnd: clean up debug output 2013-03-11 14:15:48 -04:00
C-o-r-E 2d3fc241a6 mfreerdp-server and rdpsnd server more fixes 2013-03-08 12:55:21 -05:00
C-o-r-E 989232dc41 mfreerdp-server and rdpsnd server fixes 2013-03-08 12:36:38 -05:00
C-o-r-E 84d00035d7 rdpsnd: merged 2013-03-07 14:23:18 -05:00
C-o-r-E d50cddc1bd mfreerdp-server: begin reworking rdpsnd server channel 2013-03-07 13:34:12 -05:00
Corey C 4dcb7fb54c Merge pull request #1 from bmiklautz/mfreerdp-server
server/Mac: fixes to build without xcode
2013-03-06 14:15:12 -08:00
Bernhard Miklautz 73adcd6b88 server/Mac: fixes to build without xcode 2013-03-06 00:24:03 +01:00
C-o-r-E 0603f007bf mfreerdp-server: rename timer queue 2013-03-05 17:22:52 -05:00
C-o-r-E 0f642460e1 mfreerdp-server: disabled drawing the cursor in displaystream 2013-03-04 15:17:47 -05:00
C-o-r-E 9a6d815a68 mfreerdp-server: removed manually setting sse2 optimizations in server 2013-03-04 14:12:12 -05:00
C-o-r-E 88207eaf68 merged upstream 2013-02-28 16:45:47 -05:00
C-o-r-E 7a92b878f5 mfreerdp-server: changed session events to HID events 2013-02-28 16:42:40 -05:00
C-o-r-E 3af61af2ce mfreerdp-server: cleanup input 2013-02-28 15:58:03 -05:00
C-o-r-E be47e84abb mfreerdp-server: extended keyboard event support 2013-02-28 15:51:32 -05:00
C-o-r-E c89c8b7419 mfreerdp-server: vertical scroll input support 2013-02-28 15:02:56 -05:00
C-o-r-E 3e24f4e886 mfreerdp-server: even more progress on keymap 2013-02-27 23:38:45 -05:00
C-o-r-E d512b9258d mfreerdp-server: more progress on keymap 2013-02-27 17:58:23 -05:00
C-o-r-E 24796700db mfreerdp-server: progress on keymap 2013-02-27 17:25:59 -05:00
C-o-r-E eb03084b89 mfreerdp-server: started keyboard map 2013-02-27 17:16:09 -05:00
Marc-André Moreau 2b9174a69b channels/rdpsnd: cleanup 2013-02-25 21:46:48 -05:00
C-o-r-E 7efbd3522b mfreerdp-server: mouse input tweak 2013-02-22 13:13:18 -05:00
C-o-r-E 9c459130d6 mfreerdp-server: support 3 button mouse dragging 2013-02-22 13:01:31 -05:00
C-o-r-E 5fea599d60 mfreerdp-server: basic mouse input 2013-02-21 19:56:32 -05:00
C-o-r-E fab36f25d6 mfreerdp-server: input skeleton 2013-02-20 19:20:49 -05:00
C-o-r-E b39ae79749 Merge remote-tracking branch 'upstream/master' 2013-02-19 16:36:08 -05:00
C-o-r-E 4639ea6c2c mfreerdp-server: cleanup 2013-02-19 16:26:06 -05:00
C-o-r-E 2bd632d077 mfreerdp-server: formatting 2013-02-19 15:06:42 -05:00
hardening 865ff2a5f8 Fixed compilation with -Wstrict-prototypes 2013-02-14 22:20:43 +01:00
Marc-André Moreau a17ddeea2a mfreerdp-server: merging with master 2013-01-31 11:33:08 -05:00
C-o-r-E c7c9f2f1a6 mfreerdp-server: fixed mstsc bug. 2013-01-30 18:54:08 -05:00
Marc-André Moreau d8afffd3a8 libfreerdp-core: fix server-side color depth negotiation 2013-01-27 17:17:04 -05:00
C-o-r-E f6d097aad2 mfreerdp-server: latency tweaks 2013-01-24 21:30:04 -05:00
C-o-r-E eb1534434c mfreerdp-server: rdpsnd cleanup (successive logons working) 2013-01-24 20:03:44 -05:00
C-o-r-E d9968bae7f mfreerdp-server: rdpsnd basic functionality 2013-01-24 19:21:56 -05:00
C-o-r-E cd4ba385df mfreerdp-server: rdpsnd fixes (init works) 2013-01-23 21:11:41 -05:00
C-o-r-E caa1032cce Merge remote-tracking branch 'upstream/master' 2013-01-23 16:10:57 -05:00
C-o-r-E 2404c26699 mfreerdp-server: temporarily removed conditional compilation of rdpsnd and audin 2013-01-23 16:09:09 -05:00
C-o-r-E 58e5034d5f mfreerdp-server: replaced xnew/xzalloc calls 2013-01-23 12:54:09 -05:00
Daryl Poe b64408975d freerdp primitives library 2013-01-18 15:32:58 -07:00
Corey C 17cd760e0d wfreerdp-server: merge upstream 2013-01-14 14:22:07 -05:00
Marc-André Moreau 92bf3e4ae0 libfreerdp-utils: remove sleep utils in favor of WinPR 2012-12-14 00:58:48 -05:00
C-o-r-E 6fa0342471 mfreerdp-server: enabled SSE2 optimizations, fixed warnings 2012-12-12 19:13:26 -05:00
C-o-r-E a060c8894d mfreerdp-server: fixed some conditions that will crash the server 2012-12-11 22:07:56 -05:00
C-o-r-E 0f29376911 mfreerdp-server: scaling fix, performance improvements 2012-12-11 21:20:10 -05:00
C-o-r-E f9e8ff4927 mfreerdp-server: fixed geometry again 2012-12-09 22:17:53 -05:00
C-o-r-E 9391e60c13 mfreerdp-server: begin transition to IOSurface API 2012-12-09 17:40:37 -05:00
C-o-r-E e9f008d161 mfreerdp-server: cleanup 2012-12-05 18:35:49 -05:00
C-o-r-E 777bc6cd80 mfreerdp-server: refactored screen capture, fixed corruption issue 2012-12-05 15:35:11 -05:00
C-o-r-E c21269e124 mfreerdp-server: fixed scaling issue 2012-12-03 18:59:32 -05:00
Marc-André Moreau 8a32de3801 libfreerdp: purged source tree from deprecated memory utils 2012-11-21 21:22:06 -05:00
C-o-r-E edc011487a mfreerdp-server: possible fix for displaystream 2012-11-16 12:59:16 -05:00
C-o-r-E da8ed8e88f mfreerdp-server: fixed geometry 2012-11-15 20:07:28 -05:00
C-o-r-E e1f9df8bf5 mfreerdp-server: dirty screen regions seem to work 2012-11-15 18:34:33 -05:00
C-o-r-E a05ccaa656 mfreerdp-server: add displaystream functionality 2012-11-15 18:09:20 -05:00
C-o-r-E 7c84bdbed5 mfreerdp-server: more refactoring; added info singleton 2012-11-15 15:43:58 -05:00
C-o-r-E 5ef0079ad4 mfreerdp-server: refactored file structure 2012-11-15 13:31:47 -05:00
C-o-r-E b33b0380b0 mfreerdp-server: got rfx working at 1fps 2012-11-15 12:16:10 -05:00
C-o-r-E 05cd1dc600 mfreerdp-server: disable timer after disconnect 2012-11-14 11:20:46 -05:00