Commit Graph

324 Commits

Author SHA1 Message Date
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
Armin Novak a7943a53cd Setting hostname as default domain now. 2015-06-18 16:07:25 +02:00
Armin Novak e563b2b62e Fixed domain setting for windows client. 2015-06-18 13:01:28 +02:00
Norbert Federa 87683ec87b client/windows: invalid usage of S_FALSE HRESULT
S_FALSE is a success code and not an error (note the S_)
2015-06-03 16:06:01 +02:00
Norbert Federa 77769f10b6 winpr: fixed HRESULT & SCODE types, added a ctest
- HRESULT was unsigned which means that until now all usages of the
  SUCCEDED(hr) and FAILED(hr) macros never detected any errors
- Also fixed the (unused) SCODE typedef
- Added new ctest TestTypes
2015-06-02 19:52:52 +02:00
David FORT 12f873f1f9 Fixed MessageQueue and callers 2015-05-29 14:24:14 +02:00
Marc-André Moreau 5526348079 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-05-21 13:29:59 -04:00
Marc-André Moreau 29d14773c8 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	client/Windows/wf_client.c
	libfreerdp/common/assistance.c
2015-05-20 10:12:24 -04:00
Hardening f8120919af Add checks for some XXX_New and XXX_Add functions
Based on PR #2616
2015-05-18 11:28:00 +02:00
MartinHaimberger e3236c2317 Merge pull request #2605 from nfedera/fix-2015-05-08-01
fixed multiple missing gdi return value checks
2015-05-11 16:59:32 +02:00
Norbert Federa 1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
Norbert Federa 71a4349928 fixed multiple missing gdi return value checks
mainly gdi_Create* functions
2015-05-08 21:39:23 +02:00
Marc-André Moreau 30dd40e10a wfreerdp: fix and improve remote assistance 2015-05-07 14:20:49 -04:00
Norbert Federa 25fc866a58 Fix unchecked CreateThread calls and misc fixes 2015-05-05 13:55:48 +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
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
Hardening 6cd7713e12 Merge pull request #2544 from bmiklautz/boolenization
change return types of callbacks to BOOL
2015-04-22 11:01:27 +02:00
Bernhard Miklautz 515502ffa5 change return types of callbacks to BOOL
* change all client/server callbacks to BOOL
* update all clients accordingly
* add multiple return value checks
* small fixes
2015-04-21 14:18:07 +02:00
Armin Novak d3336340ba Add *get_event_handles handle count, return check. 2015-04-21 12:24:50 +02:00
Marc-André Moreau 4faf8010b7 Merge pull request #2478 from akallabeth/win_sw_gdi_fix
Fixed resize for software GDI.
2015-03-19 09:35:31 -04:00
Armin Novak f3d6a791e7 Fixed resize for software GDI. 2015-03-17 13:03:16 +01:00
Marc-André Moreau c21bff5415 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-03-16 08:01:54 -04: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
Marc-André Moreau afdd55fa81 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-03-13 15:30:31 -04:00
Zhang Zhaolong 5b2a8ee873 wr_cliprdr: fix uninitialized variable
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-13 10:32:21 +08:00
Zhang Zhaolong 7016847e3b wf_cliprdr: fix potential memory leak.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 16:37:28 +08:00
Zhang Zhaolong 3754cfad34 wf_cliprdr: fix incorrect usage of realloc.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 11:27:39 +08:00
Denis Vincent baab23fd14 libfreerdp-core: Make tsg out channel recycling event driven 2015-02-24 15:34:41 -05:00
Marc-André Moreau 3a906caa4a freerdp: add event handle usage instead of file descriptors 2015-01-29 22:57:58 -05:00
Norbert Federa bd345ed416 build/win32: fix static build
version.rc must only be included in client executable
2015-01-20 16:23:05 +01:00
Armin Novak a3c8dec121 Prettiefied WLog messages. 2015-01-20 11:26:08 +01:00
Armin Novak a7eb657db2 Using freerdp_channels_disconnect now. 2015-01-20 11:26:00 +01:00
Norbert Federa 344362a8a3 clients: fix "focus in event" issues
The input->FocusInEvent callback implementations (normal and fast-path) have
always sent the mouse position even if the pointer was outside of the freerdp
client area. In addition xfreerdp used the wrong pointer coordinates which
were relative to the root window instead of its own.
On focus-in the pointer position must only be sent if the pointer is
currently within the program's client area. However, the clients had no way
to pass that information to input->FocusInEvent which required an API change.

- removed mouse pointer x, y parameters from input interface's FocusInEvent
- clients are responsible to call input->MouseEvent on focus-in if necessary
- fixed xfreerdp and wfreerdp accordingly
2015-01-16 18:40:57 +01:00
Armin Novak 8d4589b1e1 Replaced fprintf error messages with WLog. 2014-11-16 12:21:38 +01:00
Hardening 7b108f1aa8 Merge pull request #2141 from zhangzl2013/polyline
fix polyline.
2014-10-31 22:15:13 +01:00
Martin Fleisz 0be28ba0f6 Merge pull request #1965 from akallabeth/dynamic-addin-naming
Dynamic channel library naming
2014-10-31 13:42:16 +01:00
Martin Fleisz d58c6de93c Merge pull request #2134 from akallabeth/windows_version_information
Windows version information
2014-10-31 12:23:11 +01:00
Marc-André Moreau 8942631947 wfreerdp: add RAIL window update, partial input support 2014-10-24 19:46:02 -04:00
Marc-André Moreau 55ea4caf11 wfreerdp: partial RemoteApp support 2014-10-24 18:30:04 -04:00
Marc-André Moreau 5df3e2368d wfreerdp: stub RemoteApp callbacks 2014-10-24 11:30:04 -04:00
Marc-André Moreau ddeffce2db wfreerdp: eliminate dependency on deprecated freerdp event system 2014-10-24 10:30:54 -04:00
Marc-André Moreau 295123e7d5 wfreerdp: fix cliprdr with callback interface 2014-10-24 10:16:55 -04:00
Marc-André Moreau 2d612b332e wfreerdp: partially migrate cliprdr to callback interface 2014-10-24 09:55:48 -04:00
Marc-André Moreau f76f8e3599 channels/cliprdr: add missing callbacks and message definitions 2014-10-23 18:17:53 -04:00
Marc-André Moreau 1c7ed224b6 wfreerdp: start preparing cliprdr code for migration to cliprdr callback interface 2014-10-23 15:38:19 -04:00
Marc-André Moreau 3d0f9e8e89 wfreerdp: consolidate cliprdr code 2014-10-23 13:11:20 -04:00
Marc-André Moreau ce7302a999 wfreerdp: cleanup clipboard 2014-10-22 22:32:55 -04:00
Armin Novak 89bb28adb2 Fixed setting of RV_VERSION_PATCH, now BUILD_NUMBER is used for every library.
Executable names are now correctly set, using CMAKE_EXECUTABLE_SUFFIX now.
Fixed version defines for winpr executables.
2014-10-09 16:18:35 +02:00
Zhang Zhaolong 3de5c62bf3 fix polyline. 2014-10-09 18:11:38 +08:00
erbth 58c392e72e Added lock key synchronization to wfreerdp 2014-10-03 16:27:47 +02:00