Commit Graph

115 Commits

Author SHA1 Message Date
Armin Novak
9a1c60885c Unified RFX server color format. 2016-10-06 13:43:15 +02:00
rinov
c42edd9260 Update mf_mountain_lion.c
Remove duplicate return statement in mf_mlion_stop_getting_screen_updates()
This change is no impact anywhere.
2016-05-20 01:17:49 +09:00
Martin Haimberger
52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
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