Commit Graph

2082 Commits

Author SHA1 Message Date
Armin Novak
f634e52289 Using auto reset event now. 2015-04-20 15:04:44 +02:00
Armin Novak
5525d9f88b Fixed uninitialized return value. 2015-04-15 10:38:04 +02:00
Marc-André Moreau
4e1194c53b Merge pull request #2532 from dbungert/4bytestub
GW RPC-HTTP - 2 fixes
2015-04-14 09:23:47 -04:00
Norbert Federa
951a40b639 Merge pull request #2517 from bmiklautz/alloc
winpr allocation checks
2015-04-14 11:57:33 +02:00
Armin Novak
ea0e255058 Fixed broken pad setting. 2015-04-13 09:28:29 +02:00
Daniel Bungert
0a1273e508 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.
2015-04-10 15:09:54 -06:00
Daniel Bungert
3910baf49d GW RPC-HTTP login fix
* f469e069dc introduced a logic flip
  that broke RPC-HTTP Gateway.  Fix that.
2015-04-10 14:50:17 -06:00
Bernhard Miklautz
423b15108d Merge pull request #2522 from realjiangms/fix_WriteLock_leak
transport_write sometimes returns directly without cleanup.
2015-04-08 15:39:10 +02:00
zihao.jiang
a057526f1e transport_write sometimes returns directly without cleanup. Fix code path to always do cleanup job. 2015-04-08 21:20:07 +08:00
Bernhard Miklautz
850de59b55 winpr: add checks for *alloc
Add missing checks if memory allocation was successful. Also adapt
caller(s) when possible.
2015-04-08 11:34:37 +02:00
Bernhard Miklautz
879ed36a3c Merge pull request #2513 from hardening/license_and_security_retValues
License and security ret values
2015-04-08 11:33:57 +02:00
David FORT
c03bf75896 Take in account @nfedera's comments 2015-04-07 21:06:53 +02:00
David FORT
c0b191a1c6 Fix a too big Stream_EnsureRemainingCapacity() 2015-04-07 15:19:59 +02:00
David FORT
d84c760f7d Fix a typo in server-side code 2015-04-01 22:26:38 +02:00
David FORT
a4a58aa373 Fix the error case in mcs_send_connect_response() 2015-04-01 17:55:01 +02:00
David FORT
23e11e5a3d Fix code style 2015-04-01 16:58:25 +02:00
David FORT
5302bad2b7 Drop the limit on key size 2015-04-01 15:11:57 +02:00
David FORT
8685a8e0a2 Fixed missing return value 2015-04-01 14:24:37 +02:00
David FORT
9bb4d64608 Correctly handle HMAC_Init_ex() for older versions of OpenSSL 2015-04-01 14:12:08 +02:00
David FORT
edb915943f Treat return values in license.c
This patch changes functions that should not return void and also treat the
callers of these functions.
2015-04-01 11:38:53 +02:00
David FORT
0cf17ef98c Complement gitignore files with new generated files 2015-04-01 11:13:05 +02:00
David FORT
0eb399a717 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.
2015-04-01 11:11:37 +02:00
David FORT
cf8c7631bd Kill more exit() occurences
In general we should not have any exit() call in libfreerdp.
2015-03-31 23:56:40 +02:00
Marc-André Moreau
121ea23595 Merge pull request #2487 from mfleisz/nla_fix
Fix server side NLA
2015-03-31 10:55:04 -04:00
Norbert Federa
89b7eebaf8 Merge pull request #2509 from bmiklautz/security_fixes_v2
NULL dereference fixes
2015-03-31 15:37:16 +02:00
Marc-André Moreau
ad6723835b Merge pull request #2505 from bmiklautz/tls_shutdown
rename and update tls_disconnect
2015-03-31 09:26:30 -04:00
Armin Novak
6b0667c959 Fixed use after free and realloc checks. 2015-03-31 15:18:45 +02:00
David FORT
27c5b5b224 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
2015-03-30 21:16:18 +02:00
Hardening
bdb975afe8 Merge pull request #2510 from akallabeth/build_date
Added version and build info functions
2015-03-30 19:14:59 +02:00
Bernhard Miklautz
79de8168f9 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
2015-03-30 18:29:32 +02:00
Armin Novak
8e521e7aee Fixed return value in test. 2015-03-30 18:18:14 +02:00
Armin Novak
eedf45583a Using sprintf_s now. 2015-03-30 18:17:07 +02:00
Armin Novak
0adab13719 Now returning const char* 2015-03-30 18:09:02 +02:00
Armin Novak
cf941304b3 Fixed windows _snprintf. 2015-03-30 18:05:46 +02:00
Armin Novak
827b4f76ca Added test for freerdp version functions. 2015-03-30 17:57:16 +02:00
Armin Novak
8f228163a8 Added version and build info functions
Added functions to get
 * Version String
 * Build Time String
 * Git Revision String
and appropriate tests.
2015-03-30 17:51:29 +02:00
Bernhard Miklautz
74c8400789 coding style fixes
Add missing space after if
2015-03-30 17:15:45 +02:00
Bernhard Miklautz
f469e069dc 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.
2015-03-30 16:33:48 +02:00
Marc-André Moreau
851626f296 Merge pull request #2492 from bmiklautz/malloc_wrap
Fix compiler warnings and code hardening
2015-03-30 09:35:36 -04:00
Marc-André Moreau
ad6dc92e12 Merge pull request #2508 from nfedera/fix-2015-03-30-01
crypto: support MSFT iOS clients with faulty SNI
2015-03-30 08:23:59 -04:00
Norbert Federa
1ba681fecc 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
2015-03-30 13:48:51 +02:00
Norbert Federa
abeb79f2bb 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.
2015-03-30 13:07:03 +02:00
Bernhard Miklautz
90968e07e1 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.
2015-03-30 11:56:09 +02:00
Bernhard Miklautz
aa2181dcf2 Merge pull request #2483 from akallabeth/feat/freerdp_set_last_error_name
Feat/freerdp last error name
2015-03-26 16:42:54 +01:00
Bernhard Miklautz
7f3326d41c Fix compiler warnings
gcc 4.7.2
* warning: value computed is not used [-Wunused-value]
* warning: unused variable ‘oss’ [-Wunused-variable]
2015-03-25 17:38:21 +01:00
Bernhard Miklautz
3c7662517c hardening
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
Bernhard Miklautz
90579ae16f gdi/gfx: remove unused variables 2015-03-25 17:38:21 +01:00
Bernhard Miklautz
f75ced240d gdi: remove unnecessary includes 2015-03-25 17:38:20 +01:00
Bernhard Miklautz
b9cc206a78 gdi: remove dead code 2015-03-25 17:38:20 +01:00
Vic Lee
5f375d0a6f tls: revert checking SSL_ERROR_SYSCALL which may cause deadlock. 2015-03-25 16:07:39 +08:00