Norbert Federa [Tue, 14 Apr 2015 15:59:06 +0000 (17:59 +0200)]
xfreerdp: removed some weird/unnecessary code
Norbert Federa [Tue, 14 Apr 2015 15:03:53 +0000 (17:03 +0200)]
xfreerdp: removed desktopWidth/desktopHeight vars
These were basically unused (from the contexts's point of view)
and only served as temporary storage
Norbert Federa [Tue, 14 Apr 2015 14:32:08 +0000 (16:32 +0200)]
xfreerdp: removed unused variables from xf_monitor
Norbert Federa [Tue, 14 Apr 2015 11:07:19 +0000 (13:07 +0200)]
xfreerdp: rename xf_context's width height vars
Since several contributers in the past repeatedly made the error
to treat xfc->width and xfc->height as equal with the x11 window
width and heigth I've renamed these variables to sessionWidth and
sessionHeight.
Bernhard Miklautz [Thu, 16 Apr 2015 08:58:27 +0000 (10:58 +0200)]
Merge pull request #2546 from akallabeth/error_fixes
Fixed some warnings
Armin Novak [Wed, 15 Apr 2015 08:38:04 +0000 (10:38 +0200)]
Fixed uninitialized return value.
Armin Novak [Wed, 15 Apr 2015 08:37:28 +0000 (10:37 +0200)]
Fixed NULL dereference.
Marc-André Moreau [Tue, 14 Apr 2015 13:23:47 +0000 (09:23 -0400)]
Merge pull request #2532 from dbungert/4bytestub
GW RPC-HTTP - 2 fixes
Norbert Federa [Tue, 14 Apr 2015 11:50:33 +0000 (13:50 +0200)]
Merge pull request #2539 from bmiklautz/fix/regression
ObjectPool: fix regression
Bernhard Miklautz [Tue, 14 Apr 2015 11:47:23 +0000 (13:47 +0200)]
ObjectPool: fix regression
winpr allocation checks introduced a problem that lead to zero size
allocations in ObjectPool
Martin Haimberger [Tue, 14 Apr 2015 10:54:33 +0000 (03:54 -0700)]
autodetect: debug fixed and level adjusted
Fixed two debug statements and moved
to TRACE debug level
Martin Haimberger [Tue, 14 Apr 2015 10:49:01 +0000 (03:49 -0700)]
transport: added function to get bytes written
added function to get written bytes on transport.
This is needed to get a more accurate bandwidth
management.
Norbert Federa [Tue, 14 Apr 2015 09:57:33 +0000 (11:57 +0200)]
Merge pull request #2517 from bmiklautz/alloc
winpr allocation checks
Norbert Federa [Mon, 13 Apr 2015 12:08:47 +0000 (14:08 +0200)]
Merge pull request #2527 from AMV007/patch-1
fixed undefined behaviour of sprintf, buffer overflow, crash
Bernhard Miklautz [Mon, 13 Apr 2015 09:52:03 +0000 (11:52 +0200)]
Merge pull request #2535 from akallabeth/null_dereference_fix
Fixed NULL dereference.
Armin Novak [Mon, 13 Apr 2015 07:28:29 +0000 (09:28 +0200)]
Fixed broken pad setting.
Maxim [Sun, 12 Apr 2015 11:51:27 +0000 (14:51 +0300)]
Update urbdrc_main.c
Daniel Bungert [Fri, 10 Apr 2015 21:09:54 +0000 (15:09 -0600)]
GW RPC-HTTP - Don't drop 4 byte stub from the pipe
* Though not frequent, it's possible to get TsProxySetupReceivePipe
data of stublength 4 that is actual data. This happens when
header->common.call_id == rpc->PipeCallId &&
!(header->common.pfc_flags & PFC_LAST_FRAG).
This should address GW disconnects that manifest as SSL read errors.
Daniel Bungert [Fri, 10 Apr 2015 20:50:17 +0000 (14:50 -0600)]
GW RPC-HTTP login fix
*
f469e069dc8287f6fcfe0741961022e0cc50170f introduced a logic flip
that broke RPC-HTTP Gateway. Fix that.
Maxim [Fri, 10 Apr 2015 12:44:27 +0000 (15:44 +0300)]
fixed buffer overflow at sprintf
Maxim [Wed, 8 Apr 2015 15:21:52 +0000 (18:21 +0300)]
fixed undefined behaviour of sprintf, buffer overflow
Bernhard Miklautz [Wed, 8 Apr 2015 13:39:10 +0000 (15:39 +0200)]
Merge pull request #2522 from realjiangms/fix_WriteLock_leak
transport_write sometimes returns directly without cleanup.
zihao.jiang [Mon, 6 Apr 2015 16:24:08 +0000 (00:24 +0800)]
transport_write sometimes returns directly without cleanup. Fix code path to always do cleanup job.
Bernhard Miklautz [Tue, 7 Apr 2015 12:38:09 +0000 (14:38 +0200)]
winpr: small fixes and cleanups
Update the pull request and integrate the latest comments and
suggestions.
* TestLibrary*: fix typo in error message
* TestPipeCreateNamedPipeOverlapped: free possibly allocated memory
* smartcard_pcsc.c: format fix
* process.c: add missing NULL check
* MessageQueue.c: delete possibly initialized critical section on error
Bernhard Miklautz [Tue, 7 Apr 2015 09:05:28 +0000 (11:05 +0200)]
winpr: fixes and cleanup
Integrated notes and issues for the pending pull request
* wf_info:
* cleanup: remove unnecessary breaks
* fix typo
* change usage of calloc
* print.c: fix incorrect check
* makecert.c: cleanup includes
Bernhard Miklautz [Fri, 3 Apr 2015 14:21:01 +0000 (16:21 +0200)]
winpr: add checks for *alloc
Add missing checks if memory allocation was successful. Also adapt
caller(s) when possible.
Bernhard Miklautz [Wed, 1 Apr 2015 11:06:39 +0000 (13:06 +0200)]
comm/tests: set label comm
Set the comm label to all comm related test that they can be excluded
more easily.
Bernhard Miklautz [Mon, 30 Mar 2015 12:21:11 +0000 (14:21 +0200)]
aligned memory: fixes in _aligned_offset_recalloc
* _aligned_offset_recalloc did ignore the nmemb element
therefore only *one* element was allocated
* in case memblock was NULL the allocated memory
wasn't zeroed
* restructure realloc and recalloc to check if the memory was initially
created aligned before allocating a new segment
Bernhard Miklautz [Wed, 8 Apr 2015 09:33:57 +0000 (11:33 +0200)]
Merge pull request #2513 from hardening/license_and_security_retValues
License and security ret values
Bernhard Miklautz [Wed, 8 Apr 2015 08:35:32 +0000 (10:35 +0200)]
Merge pull request #2512 from hardening/help2353
Kill more exit() occurences
David FORT [Tue, 7 Apr 2015 19:06:53 +0000 (21:06 +0200)]
Take in account @nfedera's comments
David FORT [Tue, 7 Apr 2015 13:19:59 +0000 (15:19 +0200)]
Fix a too big Stream_EnsureRemainingCapacity()
Hardening [Tue, 7 Apr 2015 08:51:25 +0000 (10:51 +0200)]
Merge pull request #2516 from bmiklautz/cmd_fix
Fix regression introduced in 0b7f9d4
Bernhard Miklautz [Thu, 2 Apr 2015 20:53:45 +0000 (22:53 +0200)]
Fix regression introduced in 0b7f9d4
This fixes problems with command line parsing.
David FORT [Wed, 1 Apr 2015 20:26:38 +0000 (22:26 +0200)]
Fix a typo in server-side code
David FORT [Wed, 1 Apr 2015 15:55:01 +0000 (17:55 +0200)]
Fix the error case in mcs_send_connect_response()
David FORT [Wed, 1 Apr 2015 14:58:25 +0000 (16:58 +0200)]
Fix code style
David FORT [Wed, 1 Apr 2015 13:11:57 +0000 (15:11 +0200)]
Drop the limit on key size
David FORT [Wed, 1 Apr 2015 12:24:37 +0000 (14:24 +0200)]
Fixed missing return value
David FORT [Wed, 1 Apr 2015 12:12:08 +0000 (14:12 +0200)]
Correctly handle HMAC_Init_ex() for older versions of OpenSSL
David FORT [Wed, 1 Apr 2015 09:38:53 +0000 (11:38 +0200)]
Treat return values in license.c
This patch changes functions that should not return void and also treat the
callers of these functions.
David FORT [Wed, 1 Apr 2015 09:13:05 +0000 (11:13 +0200)]
Complement gitignore files with new generated files
David FORT [Wed, 1 Apr 2015 09:11:37 +0000 (11:11 +0200)]
Treat return values for security.c
This patch make functions in security.c return values when they should instead of
beeing void. And it also fix the callers of these functions.
David FORT [Mon, 30 Mar 2015 20:46:20 +0000 (22:46 +0200)]
Kill more exit() occurences
In general we should not have any exit() call in libfreerdp.
Marc-André Moreau [Tue, 31 Mar 2015 14:55:04 +0000 (10:55 -0400)]
Merge pull request #2487 from mfleisz/nla_fix
Fix server side NLA
Norbert Federa [Tue, 31 Mar 2015 13:37:16 +0000 (15:37 +0200)]
Merge pull request #2509 from bmiklautz/security_fixes_v2
NULL dereference fixes
Marc-André Moreau [Tue, 31 Mar 2015 13:26:30 +0000 (09:26 -0400)]
Merge pull request #2505 from bmiklautz/tls_shutdown
rename and update tls_disconnect
Bernhard Miklautz [Tue, 31 Mar 2015 13:20:10 +0000 (15:20 +0200)]
wlog: add missing check
Integrate pull request feedback
Armin Novak [Mon, 30 Mar 2015 09:06:56 +0000 (11:06 +0200)]
Removed scopes.
Armin Novak [Fri, 27 Mar 2015 10:42:49 +0000 (11:42 +0100)]
Removed duplicated NULL pointer checks.
Armin Novak [Fri, 27 Mar 2015 07:10:00 +0000 (08:10 +0100)]
Corrected end of string checks.
Armin Novak [Fri, 27 Mar 2015 07:09:46 +0000 (08:09 +0100)]
Removed INVALID_HANDLE_VALUE.
Armin Novak [Tue, 24 Mar 2015 11:13:41 +0000 (12:13 +0100)]
Removed INVALID_HANDLE_VALUE from types not using it.
Armin Novak [Tue, 24 Mar 2015 08:18:06 +0000 (09:18 +0100)]
Removed INVALID_HANDLE_VALUE from types not using it.
Armin Novak [Mon, 23 Mar 2015 15:07:40 +0000 (16:07 +0100)]
Fixed conversion warnings.
Armin Novak [Mon, 23 Mar 2015 14:58:16 +0000 (15:58 +0100)]
Fixed NULL pointer dereference.
Armin Novak [Mon, 23 Mar 2015 14:22:03 +0000 (15:22 +0100)]
Fixed missing checks for invalid handle.
Armin Novak [Mon, 23 Mar 2015 14:04:23 +0000 (15:04 +0100)]
Fixed use after free and realloc checks.
Bernhard Miklautz [Mon, 30 Mar 2015 19:54:27 +0000 (21:54 +0200)]
Merge pull request #2511 from hardening/fix2399
Fix segfault when the xkb layout has no variants
David FORT [Mon, 30 Mar 2015 19:16:18 +0000 (21:16 +0200)]
Fix segfault when the xkb layout has no variants
This is a fix for #2399: when there's no variants we should not try to scan them.
I have set the RDP US keyboard for the South African layout, if someone has a better
layout...
Note: we should probably set something that is not zero for other layouts
Hardening [Mon, 30 Mar 2015 17:14:59 +0000 (19:14 +0200)]
Merge pull request #2510 from akallabeth/build_date
Added version and build info functions
Hardening [Mon, 30 Mar 2015 17:11:11 +0000 (19:11 +0200)]
Merge pull request #2502 from bmiklautz/capacity
stream: Stream_Ensure*Capacity: change return type
Bernhard Miklautz [Mon, 30 Mar 2015 16:29:32 +0000 (18:29 +0200)]
Integrate feedback from pull request
* orders.c: remove ; at eol
* rdpdr_main.c: simplify error case
* rdpsnd_pulse.c: fix incorrect check
* rdpsnd_main.c: adapt return value according to documentation
* update.c: fix incorrect return values
Armin Novak [Mon, 30 Mar 2015 16:18:14 +0000 (18:18 +0200)]
Fixed return value in test.
Armin Novak [Mon, 30 Mar 2015 16:17:07 +0000 (18:17 +0200)]
Using sprintf_s now.
Armin Novak [Mon, 30 Mar 2015 16:09:02 +0000 (18:09 +0200)]
Now returning const char*
Armin Novak [Mon, 30 Mar 2015 16:05:46 +0000 (18:05 +0200)]
Fixed windows _snprintf.
Armin Novak [Mon, 30 Mar 2015 15:57:16 +0000 (17:57 +0200)]
Added test for freerdp version functions.
Armin Novak [Mon, 30 Mar 2015 15:50:47 +0000 (17:50 +0200)]
Added version and build info functions
Added functions to get
* Version String
* Build Time String
* Git Revision String
and appropriate tests.
Bernhard Miklautz [Mon, 30 Mar 2015 15:23:22 +0000 (17:23 +0200)]
drdynvc: ensure stream != NULL
Bernhard Miklautz [Mon, 30 Mar 2015 15:17:36 +0000 (17:17 +0200)]
cliprdr: ensure stream != NULL
Bernhard Miklautz [Mon, 30 Mar 2015 15:15:45 +0000 (17:15 +0200)]
coding style fixes
Add missing space after if
Bernhard Miklautz [Thu, 26 Mar 2015 16:09:47 +0000 (17:09 +0100)]
stream: Stream_Ensure*Capacity: change return type
Change the return type of Stream_Ensure*Capacity from void to BOOL to be
able to detect realloc problems easily. Otherwise the only way to detect
this was to check if the capacity after the call was >= the required
size.
In case Stream_Ensure*Capacity fails the old memory is still available
and need to freed outside.
This commit also adds checks to most calls of Stream_Ensure*Capacity to
check if the call was successful.
Marc-André Moreau [Mon, 30 Mar 2015 13:35:36 +0000 (09:35 -0400)]
Merge pull request #2492 from bmiklautz/malloc_wrap
Fix compiler warnings and code hardening
Marc-André Moreau [Mon, 30 Mar 2015 12:23:59 +0000 (08:23 -0400)]
Merge pull request #2508 from nfedera/fix-2015-03-30-01
crypto: support MSFT iOS clients with faulty SNI
Marc-André Moreau [Mon, 30 Mar 2015 12:23:40 +0000 (08:23 -0400)]
Merge pull request #2507 from nfedera/fix-2015-03-30-02
nego: fixed X.224 Connection Request PDU parsing
Norbert Federa [Mon, 30 Mar 2015 11:48:51 +0000 (13:48 +0200)]
crypto: support MSFT iOS clients with faulty SNI
Microsoft iOS Remote Desktop Clients eventually send NULL-terminated
hostnames in SNI which is not allowed in the OpenSSL implementation.
Since we're not using SNI this commit adds an OpenSSL TLS extension
debug callback which modifies the SSL context in a way preventing it
from parsing this extension
Norbert Federa [Mon, 30 Mar 2015 11:07:03 +0000 (13:07 +0200)]
nego: fixed X.224 Connection Request PDU parsing
The X.224 Connection Request PDU might contain an optional cookie or
routing token before the optional RDP Negotiation Request (rdpNegReq).
If present, both of these fields must be terminated by a 0x0D0A
two-byte sequence. It seems that until now FreeRDP has incorrectly
assumed that a token or cookie must always be present.
If that was not the case, FreeRDP was searching for 0x0D0A until it
arrived at the end of the stream which prevented the remaining data
(RDP Negotiation Request, RDP Correlation Info) from being parsed.
Bernhard Miklautz [Mon, 30 Mar 2015 09:56:09 +0000 (11:56 +0200)]
rename and update tls_disconnect
tls_disconnect shut down the ssl stream but didn't inform
the BIO(s) about this therefore could happen that a second shut down
was initiated (e.g. in bio_rdp_tls_free) causing rather long delays.
After removing the shut down from tls_disconnect the only thing the
function does is to prepare/send an alert therefore it was renamed to
tls_send_alert.
Bernhard Miklautz [Thu, 26 Mar 2015 15:42:54 +0000 (16:42 +0100)]
Merge pull request #2483 from akallabeth/feat/freerdp_set_last_error_name
Feat/freerdp last error name
Hardening [Thu, 26 Mar 2015 14:58:05 +0000 (15:58 +0100)]
Merge pull request #2498 from TaGUNil/tsmf_fix_memory_leak
Fix memory leak in TSMF video playback
tagunil [Thu, 26 Mar 2015 10:38:09 +0000 (13:38 +0300)]
tsmf: free frame data after processing
Vic Lee [Thu, 26 Mar 2015 04:04:08 +0000 (12:04 +0800)]
Merge pull request #2493 from llyzs/llyzs
tls: revert checking SSL_ERROR_SYSCALL which may cause deadlock.
Bernhard Miklautz [Wed, 25 Mar 2015 17:03:11 +0000 (18:03 +0100)]
Merge pull request #2494 from akallabeth/openh264_link_fix
Fixed OpenH264 linking
Bernhard Miklautz [Wed, 25 Mar 2015 16:37:46 +0000 (17:37 +0100)]
Integrate feedback from pull request (#2492)
* shell: add missing NULL checks
* thread: handle case where HAVE_EVENTFD_H isn't defined
* wlog: return NULL instead of 0
* wlog: use g_RootLog instead of WLog_GetRoot
otherwise a new root might be initialized on uninit
* indentation and style fixes
Bernhard Miklautz [Wed, 25 Mar 2015 11:11:22 +0000 (12:11 +0100)]
opensl: remove unnecessary memset
Bernhard Miklautz [Mon, 23 Mar 2015 16:35:11 +0000 (17:35 +0100)]
Fix compiler warnings
gcc 4.7.2
* warning: value computed is not used [-Wunused-value]
* warning: unused variable ‘oss’ [-Wunused-variable]
Bernhard Miklautz [Mon, 23 Mar 2015 16:25:23 +0000 (17:25 +0100)]
hardening
Start to add missing checks for:
* *alloc
* *_New
Bernhard Miklautz [Tue, 10 Mar 2015 11:54:52 +0000 (12:54 +0100)]
gdi/gfx: remove unused variables
Bernhard Miklautz [Tue, 10 Mar 2015 11:54:30 +0000 (12:54 +0100)]
gdi: remove unnecessary includes
Bernhard Miklautz [Tue, 10 Mar 2015 11:53:31 +0000 (12:53 +0100)]
gdi: remove dead code
Bernhard Miklautz [Tue, 10 Mar 2015 11:22:29 +0000 (12:22 +0100)]
asn1: use enum instead of returning a fixed value
Bernhard Miklautz [Tue, 10 Mar 2015 11:22:04 +0000 (12:22 +0100)]
rdtk: remove redundant casts
Armin Novak [Wed, 25 Mar 2015 09:41:40 +0000 (10:41 +0100)]
Added openh264_dll to library name hints.
Vic Lee [Wed, 25 Mar 2015 08:06:32 +0000 (16:06 +0800)]
tls: revert checking SSL_ERROR_SYSCALL which may cause deadlock.
Martin Fleisz [Mon, 23 Mar 2015 15:06:12 +0000 (16:06 +0100)]
Merge pull request #2482 from llyzs/llyzs
tls: fix error handling of no error code.
Bernhard Miklautz [Mon, 23 Mar 2015 13:24:48 +0000 (14:24 +0100)]
Merge pull request #2489 from akallabeth/security_fixes
Security fixes
Armin Novak [Mon, 23 Mar 2015 13:14:38 +0000 (14:14 +0100)]
Fixed uninitialized test argument buffer.
Armin Novak [Mon, 23 Mar 2015 13:10:49 +0000 (14:10 +0100)]
Fixed pipe cleanup.
Martin Fleisz [Mon, 23 Mar 2015 07:33:14 +0000 (08:33 +0100)]
Fix server side NLA