MartinHaimberger [Wed, 15 Jul 2015 07:47:43 +0000 (09:47 +0200)]
Merge pull request #2766 from akallabeth/snprintf_to_sprintf_s
Replaced snprintf with sprintf_s
Bernhard Miklautz [Tue, 14 Jul 2015 13:50:32 +0000 (15:50 +0200)]
Merge pull request #2782 from bmiklautz/order_does_matter
x11: reorder xf_post_disconnect
Bernhard Miklautz [Tue, 14 Jul 2015 13:28:55 +0000 (15:28 +0200)]
x11: reorder xf_post_disconnect
Channels like EGFX need resources like the main window in order to
work correctly. Before the window, GDI,.. is freed it needs to be
ensured that all channels are stopped properly to prevent them to access
already freed resources. Disconnecting the channels first fixed a
possible race condition/SEGFAULT that could occur with remote initiated
disconnects.
MartinHaimberger [Tue, 14 Jul 2015 11:02:41 +0000 (13:02 +0200)]
Merge pull request #2781 from bmiklautz/fdread
winpr/synch: remove the dependency on winsock.h
Bernhard Miklautz [Tue, 14 Jul 2015 10:21:24 +0000 (12:21 +0200)]
winpr/handle: define WINPR_FD_ on all platforms
Bernhard Miklautz [Tue, 14 Jul 2015 09:39:41 +0000 (11:39 +0200)]
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_*.
Bernhard Miklautz [Mon, 13 Jul 2015 15:52:18 +0000 (17:52 +0200)]
Merge pull request #2778 from akallabeth/cert_store_compare_fix
Fixed comparison bug, cleanup and error handling.
Armin Novak [Mon, 13 Jul 2015 13:52:06 +0000 (15:52 +0200)]
Using lowercase hostname for comparison now.
fixed argument mixup.
Armin Novak [Mon, 13 Jul 2015 12:16:04 +0000 (14:16 +0200)]
Fixed comparison bug, cleanup and error handling.
Armin Novak [Fri, 3 Jul 2015 11:26:15 +0000 (13:26 +0200)]
Replaced snprintf with sprintf_s
MartinHaimberger [Fri, 3 Jul 2015 11:04:37 +0000 (13:04 +0200)]
Merge pull request #2764 from akallabeth/pull_fixes
Pull fixes
Armin Novak [Fri, 3 Jul 2015 10:38:19 +0000 (12:38 +0200)]
Added missing include breaking windows build.
Armin Novak [Fri, 3 Jul 2015 10:31:29 +0000 (12:31 +0200)]
Fixed inverted bAttached setting.
If bAttached is TRUE, the resources of the event are not
cleaned up on CloseHandle.
MartinHaimberger [Fri, 3 Jul 2015 09:36:00 +0000 (11:36 +0200)]
Merge pull request #2762 from akallabeth/handle_write_event
Add write event support to HANDLE
Armin Novak [Fri, 3 Jul 2015 09:13:48 +0000 (11:13 +0200)]
Fixed pr comments.
MartinHaimberger [Fri, 3 Jul 2015 08:44:35 +0000 (10:44 +0200)]
Merge pull request #2761 from akallabeth/sample_server_port_arg
Updated sample server.
Armin Novak [Fri, 3 Jul 2015 07:56:43 +0000 (09:56 +0200)]
Updated sample server.
* Added new command line argument --port to allow starting the
sample server on a port different than default 3389.
* Using GetKnownSubPath now to determine location of temporary
directory for server socket.
* Using distinct server socket files for each port.
Armin Novak [Fri, 3 Jul 2015 07:36:58 +0000 (09:36 +0200)]
Handle API updated.
Armin Novak [Fri, 3 Jul 2015 07:29:36 +0000 (09:29 +0200)]
WSAEventSelect: Handle lNetworkEvents == 0
WSAEventSelect did ignore the lNetworkEvents argument.
In case this argument is 0, the non blocking socket must
be set to blocking again to mimic windows behavior.
Armin Novak [Fri, 3 Jul 2015 07:25:41 +0000 (09:25 +0200)]
Added write event support to handle functions.
Allows the WinPR HANDLE functions WaitForSingleObject and
WaitForMultipleObjects to signal in case of write events.
This is used by CreateFileDescriptor and SetEventFileDescriptor,
which got an API change accomodating for this new feature.
Armin Novak [Fri, 3 Jul 2015 07:22:02 +0000 (09:22 +0200)]
Added convenience function winpr_log_backtrace.
Bernhard Miklautz [Thu, 2 Jul 2015 14:28:55 +0000 (16:28 +0200)]
Merge pull request #2759 from bmiklautz/fix/cliprdp
x11/cliprdr: handle empty format names
Bernhard Miklautz [Thu, 2 Jul 2015 13:39:35 +0000 (15:39 +0200)]
x11/cliprdr: handle empty format names
The recently added strdup checks ignored the fact that format names
can be NULL.
Hardening [Thu, 2 Jul 2015 13:08:31 +0000 (15:08 +0200)]
Merge pull request #2747 from ilammy/egfx-missing-events
Do not discard events when updating EGFX surface mapping
Hardening [Thu, 2 Jul 2015 11:11:06 +0000 (13:11 +0200)]
Merge pull request #2758 from bmiklautz/fix/CreateProcess
CreateProcess misc fixes
Bernhard Miklautz [Thu, 2 Jul 2015 10:25:48 +0000 (12:25 +0200)]
CreateProcess: fix setting of default handler
If SA_SIGINFO isn't set in the flags sa_handler is used
instead of sa_sigaction.
This fixes also the compiler warning:
FreeRDP/winpr/libwinpr/thread/process.c: In function ‘_CreateProcessExA’:
FreeRDP/winpr/libwinpr/thread/process.c:282:20: warning: assignment from
incompatible pointer type [enabled by default]
Bernhard Miklautz [Thu, 2 Jul 2015 10:05:46 +0000 (12:05 +0200)]
CreateProcess: two fixes
* change to lpCurrentDirectory if set even if no token was supplied
* fix wrong check - add missing !
This was part of akallabeth's PR #2714.
Bernhard Miklautz [Thu, 2 Jul 2015 10:02:51 +0000 (12:02 +0200)]
Merge pull request #2757 from nfedera/nf-fix-createprocess-signals
winpr: fix CreateProcess signal handler issues
Norbert Federa [Thu, 2 Jul 2015 09:21:09 +0000 (11:21 +0200)]
winpr: fix CreateProcess signal handler issues
The calling thread of CreateProcess can be in any library and
can have arbitrary signal masks and handlers.
We now save the caller's mask and block all signals before forking.
After fork:
- child resets the handlers and unblocks all signals.
- parent restores the caller's original signal mask.
Hardening [Thu, 2 Jul 2015 07:27:27 +0000 (09:27 +0200)]
Merge pull request #2754 from akallabeth/mixed_code
Fixed mixed declarations and code.
Hardening [Thu, 2 Jul 2015 07:26:13 +0000 (09:26 +0200)]
Merge pull request #2750 from realjiangms/fix_win32_wsaevent
Fix event created for WSAEventSelect
Bernhard Miklautz [Wed, 1 Jul 2015 14:23:00 +0000 (16:23 +0200)]
Merge pull request #2753 from akallabeth/nla_null_auth_fix
nla: Fixed handling of optional TSPasswordCreds field.
Armin Novak [Wed, 1 Jul 2015 14:20:56 +0000 (16:20 +0200)]
Fixed mixed declarations and code.
Armin Novak [Wed, 1 Jul 2015 14:05:11 +0000 (16:05 +0200)]
NLA: Fixed length check.
Armin Novak [Wed, 1 Jul 2015 13:28:35 +0000 (15:28 +0200)]
Fixed handling of optional TSPasswordCreds field.
Martin Fleisz [Wed, 1 Jul 2015 12:49:00 +0000 (14:49 +0200)]
Merge pull request #2752 from akallabeth/nla_user_length_fix
NLA decrypt credentials fixed.
Armin Novak [Wed, 1 Jul 2015 12:31:55 +0000 (14:31 +0200)]
NLA decrypt credentials fixed.
Norbert Federa [Wed, 1 Jul 2015 11:02:32 +0000 (13:02 +0200)]
Merge pull request #2738 from bmiklautz/ffuncs
hardening: check fread and fwrite return values
Bernhard Miklautz [Wed, 1 Jul 2015 10:22:32 +0000 (12:22 +0200)]
Integrate pull request feedback
* unify fwrite usage - set nmemb to 1 and the size to the size to write.
zihao.jiang [Tue, 30 Jun 2015 17:13:28 +0000 (01:13 +0800)]
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'.
ilammy [Tue, 30 Jun 2015 09:41:23 +0000 (12:41 +0300)]
client/x11: do not discard events when updating EGFX surface mapping
Passing True to XSync() discards any pending X11 events. Occasionally
this caused ButtonRelease or KeyRelease to be lost and not forwarded
to the remote computed, leading to stuck keys and buttons.
This should resolve issue #2391
Bernhard Miklautz [Tue, 30 Jun 2015 08:46:38 +0000 (10:46 +0200)]
Merge pull request #2745 from mfleisz/fix_makecert
makecert: Fix double free crashes
Martin Fleisz [Tue, 30 Jun 2015 06:14:28 +0000 (08:14 +0200)]
makecert: Fix incorrect return value check
Martin Fleisz [Mon, 29 Jun 2015 16:10:59 +0000 (18:10 +0200)]
makecert: Formatting
Martin Fleisz [Mon, 29 Jun 2015 16:07:26 +0000 (18:07 +0200)]
makecert: Add strdup checks
Martin Fleisz [Mon, 29 Jun 2015 15:49:13 +0000 (17:49 +0200)]
makecert: Fix double free crashes
Bernhard Miklautz [Mon, 29 Jun 2015 09:28:06 +0000 (11:28 +0200)]
Merge pull request #2740 from realjiangms/shadow_fix_cert_2708
server/shadow: Fix incorrect handle of makecert_context_process.
Marc-André Moreau [Sun, 28 Jun 2015 19:14:04 +0000 (15:14 -0400)]
Merge pull request #2741 from awakecoding/master
egfx progressive codec frame handling
zihao.jiang [Sun, 28 Jun 2015 17:39:09 +0000 (01:39 +0800)]
server/shadow: Fix incorrect handle of makecert_context_process.
Also fix another typo for makecert_context_set_output_file_name
Marc-André Moreau [Sun, 28 Jun 2015 17:57:46 +0000 (13:57 -0400)]
libfreerdp-codec: fix egfx artifacts resulting from incorrect handling of rects inside the same egfx frame
Bernhard Miklautz [Fri, 26 Jun 2015 13:58:01 +0000 (15:58 +0200)]
hardening: check fread and fwrite return values
Marc-André Moreau [Fri, 26 Jun 2015 18:00:03 +0000 (14:00 -0400)]
Merge branch 'master' of github.com:FreeRDP/FreeRDP
Marc-André Moreau [Fri, 26 Jun 2015 17:59:41 +0000 (13:59 -0400)]
channels/rdpgfx: update debug output
Norbert Federa [Fri, 26 Jun 2015 13:30:00 +0000 (15:30 +0200)]
Merge pull request #2724 from bmiklautz/leak_fix
Fix leaks in certificate and identity handling
Marc-André Moreau [Fri, 26 Jun 2015 13:24:08 +0000 (09:24 -0400)]
Merge pull request #2737 from nfedera/nf-fix-gdi-return-value-weirdness
libfreerdp/gdi: fixed gdi return value madness
Bernhard Miklautz [Fri, 26 Jun 2015 13:12:33 +0000 (15:12 +0200)]
nla: clear identity memory before releasing
Norbert Federa [Fri, 26 Jun 2015 13:01:08 +0000 (15:01 +0200)]
Merge pull request #2727 from akallabeth/leak_fixes_reformat
Fixed leaks, NULL dereferences and broken init.
Norbert Federa [Fri, 26 Jun 2015 12:32:38 +0000 (14:32 +0200)]
libfreerdp/gdi: fixed gdi return value madness
Mostly booleanization to comply with the MS API
Marc-André Moreau [Fri, 26 Jun 2015 12:27:22 +0000 (08:27 -0400)]
Merge pull request #2719 from bmiklautz/pull/2481
OSS, tsmf, usb and BSD fixes and improvements
Bernhard Miklautz [Fri, 26 Jun 2015 12:20:37 +0000 (14:20 +0200)]
Merge pull request #2736 from akallabeth/windows_client_fix
Fixed windows client pre_connect return.
Norbert Federa [Fri, 26 Jun 2015 11:15:56 +0000 (13:15 +0200)]
Merge pull request #2734 from giox069/master
Fixes for software GDI issues #2732 and #2137
Armin Novak [Fri, 26 Jun 2015 11:13:32 +0000 (13:13 +0200)]
Fixed windows client pre_connect return.
Bernhard Miklautz [Fri, 26 Jun 2015 10:49:42 +0000 (12:49 +0200)]
Merge pull request #2735 from akallabeth/clipboard_temp_file_name_conversion_fix
[Clipboard] Fixed out of bound array access.
Hardening [Fri, 26 Jun 2015 09:15:09 +0000 (11:15 +0200)]
Merge pull request #2729 from akallabeth/win_reg_key_by_vendor_product_define
Replaced hard coded registry keys with cmake defines.
Armin Novak [Fri, 26 Jun 2015 07:50:21 +0000 (09:50 +0200)]
Fixed out of bound array access.
Giovanni Panozzo [Thu, 25 Jun 2015 14:54:08 +0000 (16:54 +0200)]
Returing OK when there is nothing to draw after clipping, fixes #2732
Giovanni Panozzo [Thu, 25 Jun 2015 14:49:29 +0000 (16:49 +0200)]
Signed glyph offset calculation, fixes #2137
Norbert Federa [Thu, 25 Jun 2015 10:39:12 +0000 (12:39 +0200)]
Merge pull request #2731 from akallabeth/mutex_cleanup_fix
Fixed mutex trylock in MutexCloseHandle.
Armin Novak [Thu, 25 Jun 2015 10:24:28 +0000 (12:24 +0200)]
Fixed mutex trylock in MutexCloseHandle.
Norbert Federa [Thu, 25 Jun 2015 10:11:50 +0000 (12:11 +0200)]
Merge pull request #2728 from bmiklautz/unsigned
Fix possible endless loops on cleanup.
Bernhard Miklautz [Thu, 25 Jun 2015 09:53:03 +0000 (11:53 +0200)]
clipboard: fix of by one error on cleanup
Bernhard Miklautz [Thu, 25 Jun 2015 08:33:54 +0000 (10:33 +0200)]
Integrate pull request feedback
Use while instead of for with additional variable where appropriate.
Armin Novak [Wed, 24 Jun 2015 12:59:59 +0000 (14:59 +0200)]
Fixed cleanup of resources, only in error case now.
Armin Novak [Wed, 24 Jun 2015 09:12:59 +0000 (11:12 +0200)]
Replaced registry keys with cmake defines.
Bernhard Miklautz [Wed, 24 Jun 2015 10:26:13 +0000 (12:26 +0200)]
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.
Armin Novak [Wed, 24 Jun 2015 10:12:40 +0000 (12:12 +0200)]
Fixed cleanup of MachineAddresses and MachinePorts.
Armin Novak [Wed, 24 Jun 2015 08:08:04 +0000 (10:08 +0200)]
Fixed loop condition.
Armin Novak [Wed, 24 Jun 2015 08:02:42 +0000 (10:02 +0200)]
Fixed memory leak.
Armin Novak [Wed, 24 Jun 2015 08:02:30 +0000 (10:02 +0200)]
Fixed sizeof misuse.
Armin Novak [Wed, 24 Jun 2015 07:45:40 +0000 (09:45 +0200)]
Fixed a resource leak.
Armin Novak [Wed, 24 Jun 2015 07:33:20 +0000 (09:33 +0200)]
Fixed a resource leak.
Armin Novak [Wed, 24 Jun 2015 07:29:52 +0000 (09:29 +0200)]
Fixed a resource leak.
Armin Novak [Wed, 24 Jun 2015 07:29:13 +0000 (09:29 +0200)]
Fixed a resource leak.
Martin Fleisz [Wed, 24 Jun 2015 07:22:55 +0000 (09:22 +0200)]
Merge pull request #2717 from realjiangms/shadow_encoder_fps
server/shadow: shadow encoder related enhancement/fix.
Armin Novak [Tue, 23 Jun 2015 19:29:21 +0000 (21:29 +0200)]
Fixed leaks, NULL dereferences and broken init.
Hardening [Tue, 23 Jun 2015 17:32:26 +0000 (19:32 +0200)]
Merge pull request #2725 from akallabeth/warning_fixes_more_more_more
Warning fixes more more more
Armin Novak [Tue, 23 Jun 2015 14:04:15 +0000 (16:04 +0200)]
Removed unused variable and incorrect comment.
Armin Novak [Tue, 23 Jun 2015 14:02:53 +0000 (16:02 +0200)]
ifdef variables used with specific build options.
Bernhard Miklautz [Tue, 23 Jun 2015 13:40:37 +0000 (15:40 +0200)]
Fix leaks in certificate and identity handling
Bernhard Miklautz [Tue, 23 Jun 2015 12:30:23 +0000 (14:30 +0200)]
Merge pull request #2721 from akallabeth/warning_fixes_some_more
Some warnings fixed
Armin Novak [Tue, 23 Jun 2015 10:25:07 +0000 (12:25 +0200)]
Fixed memory leak.
Armin Novak [Tue, 23 Jun 2015 10:17:37 +0000 (12:17 +0200)]
Added missing argument checks.
Armin Novak [Tue, 23 Jun 2015 10:12:59 +0000 (12:12 +0200)]
Fixed malloc with 0 size.
Armin Novak [Tue, 23 Jun 2015 10:12:16 +0000 (12:12 +0200)]
Fixed uninitialized value.
Armin Novak [Tue, 23 Jun 2015 10:09:42 +0000 (12:09 +0200)]
Fixed uninitialized value.
Armin Novak [Tue, 23 Jun 2015 10:08:47 +0000 (12:08 +0200)]
Fixed grabage return value.
Armin Novak [Tue, 23 Jun 2015 10:07:38 +0000 (12:07 +0200)]
Fixed NULL pointer dereference.
Bernhard Miklautz [Tue, 23 Jun 2015 09:40:04 +0000 (11:40 +0200)]
tsmf_oss: fix compiler warning
Norbert Federa [Tue, 23 Jun 2015 09:18:19 +0000 (11:18 +0200)]
Merge pull request #2708 from bmiklautz/dupdup
alloc and strdup checks
Bernhard Miklautz [Tue, 23 Jun 2015 09:08:44 +0000 (11:08 +0200)]
core: use error instead of debug
When the function would return with an error print an error message
instead of a debug message