Commit Graph

8461 Commits

Author SHA1 Message Date
Armin Novak
d50ce6bd7a Corrected end of string checks. 2015-03-31 15:18:46 +02:00
Armin Novak
853ac63afd Removed INVALID_HANDLE_VALUE. 2015-03-31 15:18:46 +02:00
Armin Novak
bd55b0df80 Removed INVALID_HANDLE_VALUE from types not using it. 2015-03-31 15:18:45 +02:00
Armin Novak
b3ea02a777 Removed INVALID_HANDLE_VALUE from types not using it. 2015-03-31 15:18:45 +02:00
Armin Novak
878aecfa48 Fixed conversion warnings. 2015-03-31 15:18:45 +02:00
Armin Novak
e68726400d Fixed NULL pointer dereference. 2015-03-31 15:18:45 +02:00
Armin Novak
afe8bd2a86 Fixed missing checks for invalid handle. 2015-03-31 15:18:45 +02:00
Armin Novak
6b0667c959 Fixed use after free and realloc checks. 2015-03-31 15:18:45 +02:00
Bernhard Miklautz
755c9e304b Merge pull request #2511 from hardening/fix2399
Fix segfault when the xkb layout has no variants
2015-03-30 21:54:27 +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
Hardening
7f497c6b7b Merge pull request #2502 from bmiklautz/capacity
stream: Stream_Ensure*Capacity: change return type
2015-03-30 19:11:11 +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
8615f74eac drdynvc: ensure stream != NULL 2015-03-30 17:23:22 +02:00
Bernhard Miklautz
6a997fad53 cliprdr: ensure stream != NULL 2015-03-30 17:17:36 +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
Marc-André Moreau
644fafab8e Merge pull request #2507 from nfedera/fix-2015-03-30-02
nego: fixed X.224 Connection Request PDU parsing
2015-03-30 08:23:40 -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
Hardening
29e2b1f763 Merge pull request #2498 from TaGUNil/tsmf_fix_memory_leak
Fix memory leak in TSMF video playback
2015-03-26 15:58:05 +01:00
tagunil
45ea141974 tsmf: free frame data after processing 2015-03-26 13:38:09 +03:00
Vic Lee
1b6ef84b5f Merge pull request #2493 from llyzs/llyzs
tls: revert checking SSL_ERROR_SYSCALL which may cause deadlock.
2015-03-26 12:04:08 +08:00
Bernhard Miklautz
73f0153bb6 Merge pull request #2494 from akallabeth/openh264_link_fix
Fixed OpenH264 linking
2015-03-25 18:03:11 +01:00
Bernhard Miklautz
1d7b3694a9 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
2015-03-25 17:38:21 +01:00
Bernhard Miklautz
f2b4709cbd opensl: remove unnecessary memset 2015-03-25 17:38:21 +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
Bernhard Miklautz
f717075321 asn1: use enum instead of returning a fixed value 2015-03-25 17:38:20 +01:00
Bernhard Miklautz
91ba10e168 rdtk: remove redundant casts 2015-03-25 17:38:20 +01:00
Armin Novak
de4d571208 Added openh264_dll to library name hints. 2015-03-25 10:41:40 +01:00
Vic Lee
5f375d0a6f tls: revert checking SSL_ERROR_SYSCALL which may cause deadlock. 2015-03-25 16:07:39 +08:00
Martin Fleisz
5fa777b11c Merge pull request #2482 from llyzs/llyzs
tls: fix error handling of no error code.
2015-03-23 16:06:12 +01:00
Bernhard Miklautz
ea648c5580 Merge pull request #2489 from akallabeth/security_fixes
Security fixes
2015-03-23 14:24:48 +01:00
Armin Novak
47f38b3059 Fixed uninitialized test argument buffer. 2015-03-23 14:14:38 +01:00
Armin Novak
54cb89f303 Fixed pipe cleanup. 2015-03-23 14:10:49 +01:00
Martin Fleisz
8d783bd2f0 Fix server side NLA 2015-03-23 08:33:14 +01:00