Commit Graph

116 Commits

Author SHA1 Message Date
Norbert Federa f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak 649d270ccd Fixed GDI_RGN->null initialization. 2016-10-06 13:43:15 +02:00
Armin Novak 22ddec810b Moved pre and post channel hooks. 2016-10-06 13:43:10 +02:00
Armin Novak d35823cf69 Moved channel init code to core library. 2016-10-06 13:43:09 +02:00
Armin Novak dadc5262ae Removed static channel variables.
Global static variables do not work, if more than one instance
of an RDP client is running in the same process space.
Removed the varaibles where possible and replaced them with
thread local storage where necessary.
2016-10-06 13:43:09 +02:00
Armin Novak 36cbf1b583 Fixed error handling for channel load failures. 2016-03-14 13:13:43 +01: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
Norbert Federa 71a4349928 fixed multiple missing gdi return value checks
mainly gdi_Create* functions
2015-05-08 21:39:23 +02:00
Norbert Federa e3fb908686 Fix unchecked CreateSemaphore calls 2015-05-07 13:28:03 +02: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
Armin Novak c380fb3520 Added flag to ignore unknown keywords
freerdp_client_settings_parse_command_line now allows ignoring
unknown keywords.
2015-03-16 10:15:37 +01:00
Armin Novak be2cf5595e Using freerdp_channels_disconnect now. 2015-01-20 11:24:14 +01:00
Armin Novak a715e9ef50 Fixed compiler warnings. 2014-09-15 08:55:00 +02:00
Armin Novak 7913a57bc5 Using wlog for logging in clients now. 2014-09-15 08:55:00 +02: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
Armin Novak 0780c0993e Replaced fprintf(stderr with DEBUG_WARN 2014-08-07 22:21:07 +02: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
Marc-André Moreau 2a82684521 channels: cleanup unused freerdp channels global functions 2014-06-11 16:27:31 -04:00
Marc-André Moreau 59eccac4e7 libfreerdp-client: refactor and decouple rdpSettings* from client context 2013-10-12 21:07:12 -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 208c9f844a freerdp: fix core API bugs 2013-06-13 21:34:46 -04:00
Marc-André Moreau f4df4e4b26 channels: partial cleanup 2013-03-29 14:49:09 -04:00
Marc-André Moreau d187becc28 freerdp: merge with master 2013-03-28 21:20:36 -04:00
Marc-André Moreau 3417a3aab5 freerdp: merge RDP_EVENT type with wMessage 2013-03-28 21:13:56 -04:00
Marc-André Moreau f757623f7f channels: replace event_type, event_class with id for events 2013-03-28 20:23:16 -04:00
Marc-André Moreau 72bf8ea032 libfreerdp-utils: start migrating old eventing system 2013-03-28 18:29:57 -04:00
Hardening 7701c9d934 Replace printf(...) by fprintf(stderr, ...) 2013-03-28 23:06:34 +01:00
Marc-André Moreau 44758bfe54 libfreerdp-locale: start moving some code to libwinpr-input 2013-03-03 16:30:31 -05:00
hardening 865ff2a5f8 Fixed compilation with -Wstrict-prototypes 2013-02-14 22:20:43 +01:00
Daryl Poe b64408975d freerdp primitives library 2013-01-18 15:32:58 -07:00
Marc-André Moreau 4747effa9d libfreerdp-client: cleanup old syntax detection 2012-12-02 14:18:36 -05:00
Marc-André Moreau e6f524f6c3 libfreerdp-client: accept posix-style command-line syntax 2012-12-02 13:34:00 -05:00
Marc-André Moreau 3626998210 client: migrate all clients to new command-line interface 2012-11-26 12:49:21 -05:00
Marc-André Moreau 8a32de3801 libfreerdp: purged source tree from deprecated memory utils 2012-11-21 21:22:06 -05:00
Marc-André Moreau 2a16183f5d libfreerdp-utils: remove deprecated calls to xnew() macro 2012-11-21 20:21:08 -05:00
Marc-André Moreau 5e77cefb08 libfreerdp-utils: removed part of the deprecated calls to xzalloc 2012-11-19 23:49:08 -05:00
Marc-André Moreau 6427c9dd90 libfreerdp-core: rdpSettings refactoring (part 2) 2012-11-07 15:13:14 -05:00
Marc-André Moreau 8e424f7e4c channels: simplify API 2012-10-16 12:41:16 -04:00
Marc-André Moreau aaef9694ab libfreerdp-channels: split in client/server functionality, move to libfreerdp-channels-client and libfreerdp-channels-server 2012-10-15 17:03:34 -04:00
Marc-André Moreau 7f98af7d20 libfreerdp-client: update clients to link to proper library 2012-10-14 12:21:33 -04:00
Marc-André Moreau 06fa85f31c cmake: refactoring of MONOLITHIC_BUILD 2012-10-13 17:30:59 -04:00
Marc-André Moreau cdf56c0e3f dfreerdp: fix loading of static channels 2012-10-09 12:38:18 -04:00
Marc-André Moreau 9d064171a7 freerdp: get rid of old types 2012-10-09 03:26:39 -04:00
Marc-André Moreau 1bf8a45519 freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16 2012-10-09 03:01:37 -04:00
Marc-André Moreau 1ed644786c freerdp: change boolean type to BOOL type 2012-10-09 02:38:39 -04:00
Marc-André Moreau 5612bc43f8 freerdp: change true/false to TRUE/FALSE 2012-10-09 02:31:28 -04:00
Marc-André Moreau 9909a12af5 libfreerdp-utils: get rid of xmalloc, xrealloc and xfree 2012-10-08 23:21:26 -04:00
Marc-André Moreau e60a092d81 freerdp: fix headers 2012-10-08 23:02:04 -04:00
Marc-André Moreau 40eea7c76b cmake: rename WITH_MONOLITHIC_BUILD to MONOLITHIC_BUILD 2012-10-08 22:55:06 -04:00
Marc-André Moreau 837cc777ce channels: move include/freerdp/plugins to include/freerdp/client 2012-10-08 20:33:58 -04:00