Commit Graph

1378 Commits

Author SHA1 Message Date
Bernhard Miklautz
1f13781fe1 Merge pull request #2855 from akallabeth/memleak_fixes
Memleak fixes
2015-08-31 09:50:21 +02:00
Bernhard Miklautz
05c02da742 settings: update settings/help to match
* wallpaper was off but help said "default: on"
* compression is on but help said "default: off"

Fixes #2853
2015-08-28 11:09:38 +02:00
Armin Novak
dd9d66a3e6 Fixed NONNULL argument warnings. 2015-08-28 10:59:48 +02:00
Armin Novak
07bba9b623 Fixed NONNULL argument warnings. 2015-08-28 10:58:20 +02:00
Marc-André Moreau
223e0c7900 Merge pull request #2785 from MartinHaimberger/mh-channel-fix
Channel hardening and fixing
2015-08-27 09:24:10 -04:00
Martin Haimberger
52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Vic Lee
6f639c1e34 gcc: read and write desktop scale settings in core data. 2015-08-27 16:19:40 +08:00
Vic Lee
8394d8c677 gcc: read and write monitor extended data. 2015-08-27 15:26:37 +08:00
Martin Haimberger
420a86e1c7 Merge remote-tracking branch 'upstream/master' into mh-channel-fix
Conflicts:
	channels/drdynvc/client/drdynvc_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	client/X11/xf_gfx.c
2015-08-25 00:07:04 -07:00
Marc-André Moreau
d7329194fc Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-08-04 11:55:38 -04:00
Martin Haimberger
2862109337 Merge remote-tracking branch 'upstream/master' into mh-channel-fix
Conflicts:
	channels/smartcard/client/smartcard_main.c
	channels/smartcard/client/smartcard_operations.c
2015-07-30 07:29:12 -07:00
Bernhard Miklautz
a22dc21c15 remdesk,encomps: misc fixes
* only free stream when an error occurs
* ignore unhanded messages instead of throwing an error
* fix memory leak in settings
2015-07-29 17:32:09 +02:00
Clive Stevens
99228ee254 Fix race condition in freerdp_channels_client_load
If g_pInterface is set to NULL outside the critical section in one thread
while another thread is in the critical section, the channel client context
allocated in the VirtualChannelEntry won't end up getting freed.

The channel client context is normally loaded from g_pInterface in
FreeRDP_VirtualChannelInit and stored in the pChannelInitData, then copied
from there onto the pChannelOpenData structure in FreeRDP_VirtualChannelOpen
and finally freed in freerdp_channels_free.
2015-07-29 14:26:33 +01:00
Marc-André Moreau
5cb06ecc68 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-07-28 09:21:33 -04:00
Bernhard Miklautz
a342d40158 core/listner: fix possible problem in _free 2015-07-27 11:24:21 +02:00
Bernhard Miklautz
458d3b1593 transport: fix regression introduced with PR #2770
When the event is reset in transport_check_fds xfreerdp doesn't work and
consumes 100% CPU (see #2790). On windows this is require otherwise the
CPU consumption is 100% there.
This quick fix only resets the event on windows. It's a working approach
but definitely not the final solution.
2015-07-17 12:06:41 +02:00
Vic Lee
042cb250f3 Merge pull request #2770 from akallabeth/bio_event_reset
Resetting frontBio after read now.
2015-07-16 06:57:46 -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
Bernhard Miklautz
68e8569110 winpr/synch: remove the dependency on winsock.h
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Armin Novak
098eda9873 Error checks for BIO_get_event
ResetEvent before reading data from transport BIO.
2015-07-09 12:20:22 +02:00
Armin Novak
0120ee75ca Resetting frontBio after read now. 2015-07-07 14:48:27 +02:00
Armin Novak
d18b0fbeb4 Handle API updated. 2015-07-03 09:52:52 +02:00
Hardening
ac93b26ba8 Merge pull request #2750 from realjiangms/fix_win32_wsaevent
Fix event created for WSAEventSelect
2015-07-02 09:26:13 +02:00
Armin Novak
3a9db563fd NLA: Fixed length check. 2015-07-01 16:05:11 +02:00
Armin Novak
8479c824fd Fixed handling of optional TSPasswordCreds field. 2015-07-01 15:30:38 +02:00
Armin Novak
6c0e1af4af NLA decrypt credentials fixed. 2015-07-01 14:31:55 +02:00
zihao.jiang
75407edf37 Fix event created for WSAEventSelect: The event we pass to WSAEventSelect should be WSAEVENT instead of normal event.
From MSDN, it looks same as CreateEvent(NULL, FALSE, FALSE, NULL):
	The WSACreateEvent function creates a manual-reset event object with an initial state of nonsignaled. The event object is unnamed.
However they are not really equivalent. When we use normal event, the WSAEventSelect still works but the event appears to be 'auto-reset'.
2015-07-01 01:52:59 +08:00
Marc-André Moreau
161359f6ec libfreerdp-core: fix receiving of logon error info during capability exchange 2015-06-29 12:43:18 -04:00
Bernhard Miklautz
1cee185e3c hardening: check fread and fwrite return values 2015-06-26 20:38:30 +02:00
Norbert Federa
20878e50fe Merge pull request #2724 from bmiklautz/leak_fix
Fix leaks in certificate and identity handling
2015-06-26 15:30:00 +02:00
Bernhard Miklautz
77ef5a80de nla: clear identity memory before releasing 2015-06-26 15:12:33 +02:00
Norbert Federa
ac95b7274e Merge pull request #2727 from akallabeth/leak_fixes_reformat
Fixed leaks, NULL dereferences and broken init.
2015-06-26 15:01:08 +02:00
Marc-André Moreau
ddf2519f1e Merge pull request #2719 from bmiklautz/pull/2481
OSS, tsmf, usb and BSD fixes and improvements
2015-06-26 08:27:22 -04:00
Hardening
b411c11f6e Merge pull request #2729 from akallabeth/win_reg_key_by_vendor_product_define
Replaced hard coded registry keys with cmake defines.
2015-06-26 11:15:09 +02:00
Bernhard Miklautz
28e63786cd Integrate pull request feedback
Use while instead of for with additional variable where appropriate.
2015-06-25 10:33:54 +02:00
Armin Novak
e8bfa29bd2 Replaced registry keys with cmake defines. 2015-06-24 14:02:48 +02:00
Bernhard Miklautz
9f6fa7ef4c Fix possible endless loops on cleanup.
Some cleanup code possibly create endless loops because an unsigned
type was used as run variable but the check was >= 0 in the for loop.
2015-06-24 12:26:13 +02:00
Armin Novak
ee221315db Fixed loop condition. 2015-06-24 10:08:04 +02:00
Armin Novak
6698e24228 Fixed leaks, NULL dereferences and broken init. 2015-06-23 21:29:21 +02:00
Bernhard Miklautz
2e87d0ee52 Fix leaks in certificate and identity handling 2015-06-23 15:40:37 +02:00
Armin Novak
24fed46cda Fixed grabage return value. 2015-06-23 12:08:47 +02:00
Armin Novak
212db120e0 Fixed NULL pointer dereference. 2015-06-23 12:07:38 +02:00
Bernhard Miklautz
ff8d172a12 core: use error instead of debug
When the function would return with an error print an error message
instead of a debug message
2015-06-23 11:15:13 +02:00
Bernhard Miklautz
09445c2b0e nla and cmdline: integrated feedback
* fix possible problems with 0 size lengths
* add return value checks
2015-06-23 10:14:11 +02:00
Bernhard Miklautz
af81a91ea7 windows: fix compilation and warnings 2015-06-22 19:31:25 +02:00
Bernhard Miklautz
06502e6a91 misc: integrate pull request feedback 2015-06-22 19:24:30 +02: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
77927c213e android: fix misc compiler warnings
with gcc version arm-linux-androideabi-gcc (GCC) 4.8
2015-06-22 19:09:59 +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