Commit Graph

1997 Commits

Author SHA1 Message Date
Martin Haimberger
6e4e1c2773 Merge remote-tracking branch 'upstream/master' into mh-stream-fix
Conflicts:
	client/Windows/wf_cliprdr.c
2015-06-18 03:06:40 -07:00
Martin Haimberger
dc68bdfce5 channel rdpgfx hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger
6348e41479 channel rdpei hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger
d7636d0e28 channel rail hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger
b9853f87eb channel encomsp hardend 2015-06-18 03:04:32 -07: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
f04bb6c53d xfreerdp: xfc->palette wasn't updated with /gdi:sw
When using software gdi (/gdi:sw) the rdp update PDU callback
gdi_palette_update() is used which writes the new colors to
the rdpContext's gdi->palette buffer.
The X11 functions however access xfc->palette which gets only
updated by xf_gdi_palette_update() which is the callback if
/gdi:hw is used.

This commit changes xfc->palette to a pointer which points to
xfc's private buffer with /gdi:hw or to the gdi->palette if
software gdi is used.
2015-06-11 18:40:41 +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
Hardening
29de9b6d4e Merge pull request #2658 from hardening/fix_2657
Fix for #2657
2015-05-29 17:58:30 +02:00
David FORT
12f873f1f9 Fixed MessageQueue and callers 2015-05-29 14:24:14 +02:00
David FORT
85c350f5da Fix for #2657 2015-05-27 15:13:43 +02:00
Norbert Federa
8a53e5ee68 client/iOS: fix ios_context_new
- fixed wrong signature since ContextNew is BOOL now
- added error checking
2015-05-25 22:21:53 +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
b9c1cddc2e Merge pull request #2583 from bceverly/OpenBSD-cleanup
Two minor source code changes to remove warnings
2015-05-21 10:17:54 -04:00
Norbert Federa
cd0a8e0506 Merge pull request #2630 from hardening/new_2616
Add checks for some XXX_New and XXX_Add functions
2015-05-21 16:04:26 +02:00
David FORT
b83af4c059 Fixed declaration of xf_event_action_script_init() 2015-05-20 21:01:46 +02:00
David FORT
29d372480a Take in account nfedera's review 2015-05-20 19:19:50 +02: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
Norbert Federa
4d661fdb35 client/x11: fix + simplify invalidate_poly_region 2015-05-19 01:13:40 +02: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
Norbert Federa
1b5abec683 client/x11: fixed if statements with empty body 2015-05-17 18:24:11 +02:00
Norbert Federa
51b697d4c8 transport/mfreerdp: fix async transport
- handle WAIT_TIMEOUT result as error in async transport thread
  if an INFINITE timeout was specified in WaitForMultipleObjects
- fix mfreerdp's async transport handling to not use
  freerdp_get_event_handles/freerdp_check_event_handles if async
  transport is activated
2015-05-14 21:57:16 +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
Hardening
a88adcbb7e Merge pull request #2601 from nfedera/fix-2015-05-07-01
Fix some unchecked create calls
2015-05-07 19:06:59 +02:00
Norbert Federa
b2dcde35ee Merge pull request #2599 from hardening/fix_wayland_colors
Fix colors with the wayland client
2015-05-07 18:15:01 +02:00
David FORT
0e2925d0b8 Fix remoteApps
The assert that have been removed were preventing RAIL from working when you
have an intermediary screen before seeing the application.
2015-05-07 14:36:07 +02:00
Norbert Federa
e3fb908686 Fix unchecked CreateSemaphore calls 2015-05-07 13:28:03 +02:00
Marc-André Moreau
6b1fefea40 freerdp: fix remote assistance mode, add multi-address connection 2015-05-06 16:32:45 -04:00
David FORT
b09f6bedb7 Fix colors with the wayland client 2015-05-06 21:54:39 +02:00
Norbert Federa
25fc866a58 Fix unchecked CreateThread calls and misc fixes 2015-05-05 13:55:48 +02:00
Bryan Everly
df9ae5e31b Changed the xf_tsmf.c code to test for zero visible rectangles for all platforms. Modified arc4random() change to actually have a skeletal implementation in winpr for BCryptGenRandom() on all platforms. 2015-04-30 10:12:37 -04: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
Bryan Everly
6ed90e831e Fixed linker warning about insecure crypto and fixed compiler warning about unsigned being compared to less than zero 2015-04-28 10:50:29 -04:00
Marc-André Moreau
1fea6bf702 Merge pull request #2568 from nfedera/fix-2015-04-23-01
codec/rfx: error checking and various fixes
2015-04-24 13:36:27 -04:00
Bryan Everly
18b335e2f2 Added support for manpage construction for OpenBSD 2015-04-24 08:38:35 -04: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
Armin Novak
7524ea53c6 Updated to new freerdp_get_event_handles API. 2015-04-22 11:17:47 +02:00
Armin Novak
a07d1c4b97 Updated wayland client to new API. 2015-04-22 11:16:41 +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
Bryan Everly
8c75127a67 Necessary changes to get latest branch working on OpenBSD 5.6 2015-04-21 14:42:06 -04:00
Bernhard Miklautz
1e6943bf31 Fix formating 2015-04-21 14:20:24 +02:00
Bernhard Miklautz
db81151ea4 gdi: fix broken return type checks
Integrates comments from pull request.
2015-04-21 14:18:07 +02:00
Bernhard Miklautz
2c072d33d3 Fix GDI return values and other fixes
* top level GDI functions return 0 on error and != 0 otherwise but the
  low level functions (16bpp.c, 8bpp.c 32bpp.c) which are called did it
	exactly the other way around. Those were adapted.
* change gdi_InvalidateRegion to BOOL and check calls where appropriate
* integrate comments from pull request
2015-04-21 14:18:07 +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
Bernhard Miklautz
43695bc15d ios: updates to build with xcode6+
* update tool chain to use clang instead of gcc
* add compatibility function for fwrite
2015-04-21 14:16:32 +02:00
Armin Novak
d3336340ba Add *get_event_handles handle count, return check. 2015-04-21 12:24:50 +02:00