Commit Graph

8546 Commits

Author SHA1 Message Date
Norbert Federa
b9771f8a44 Merge pull request #2597 from clivest/bitstream_read_fix
Fix bitstream reading bounds check
2015-05-07 18:42:15 +02:00
Norbert Federa
509230f6b1 Merge pull request #2598 from clivest/stream_leak_fix
Fix two cases of stream resource leak
2015-05-07 18:24:47 +02:00
Norbert Federa
b2dcde35ee Merge pull request #2599 from hardening/fix_wayland_colors
Fix colors with the wayland client
2015-05-07 18:15:01 +02:00
Norbert Federa
e290e55554 Merge pull request #2603 from hardening/rail_empty_title_fix
Fix empty window title
2015-05-07 18:13:09 +02:00
Norbert Federa
525ae6c561 Merge pull request #2604 from hardening/rail_fix
Fix remoteApps
2015-05-07 18:11:38 +02:00
David FORT
c330a3715e Fix empty window title
When the size of a RAIL string was 0, we were reporting an OOM error.
2015-05-07 15:08:00 +02:00
David FORT
0e2925d0b8 Fix remoteApps
The assert that have been removed were preventing RAIL from working when you
have an intermediary screen before seeing the application.
2015-05-07 14:36:07 +02:00
David FORT
b09f6bedb7 Fix colors with the wayland client 2015-05-06 21:54:39 +02:00
Clive Stevens
2e41c5425b Fix whitespace 2015-05-06 15:54:23 +01:00
Clive Stevens
75865b5c3b Fix bitstream reading
The bounds checks where previously incorrect
2015-05-06 15:37:11 +01:00
Clive Stevens
b06e50479e Fix two cases of potentially leaked streams 2015-05-06 15:23:37 +01:00
Martin Fleisz
063c1bc806 Merge pull request #2592 from nfedera/fix-2015-05-05-01
Fix unchecked CreateThread calls and misc fixes
2015-05-06 10:16:26 +02:00
Marc-André Moreau
1de81c30a4 Merge pull request #2587 from floppym/armfix
Remove the ARM_FP_ABI option
2015-05-05 10:56:12 -04:00
Marc-André Moreau
70ecd9b619 Merge pull request #2589 from baruchsiach/fix-math
Don't use unavailable C99 long double math functions
2015-05-05 10:47:03 -04:00
Norbert Federa
25fc866a58 Fix unchecked CreateThread calls and misc fixes 2015-05-05 13:55:48 +02:00
MartinHaimberger
9a4f645f78 Merge pull request #2582 from nfedera/fix-2015-04-28-01
Fix unchecked CreateEvent calls and misc fixes
2015-05-04 10:14:27 +02:00
Baruch Siach
414663cc36 Don't use unavailable C99 long double math functions
uClibc variants do not provide the C99 long double math functions like ceill,
powl, etc.. For future compatibility use check_symbol_exists() to check
whether these functions are available, and keep the result in
HAVE_MATH_C99_LONG_DOUBLE. Use that instead of the fragile Cygwin version
check in triodef.h.

Fixes build failures under uClibc(-ng) like:

../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `powl'
../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `fmodl'
../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `ceill'
../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `log10l'
../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `floorl'
collect2: error: ld returned 1 exit status

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2015-05-03 21:12:30 +03:00
Mike Gilbert
2355b54f85 Remove the ARM_FP_ABI option
It's unclear why this option would be necessary, and it causes problems
when people do not match it to their toolchain and CFLAGS.

To set the float abi, either use a toolchain with an appropriate default
or set the float-abi option in the CFLAGS environment variable.

This should resolve #2586.
2015-05-01 17:35:21 -04:00
Bernhard Miklautz
dd2e7f393d Merge pull request #2584 from baruchsiach/fix-eventfd-2
Fix build with newer uclibc versions
2015-04-30 14:20:33 +02:00
Norbert Federa
7edb38df84 Increase API version to 1.2.3 2015-04-30 09:20:34 +02:00
Baruch Siach
3b7d3190a1 Fix build with newer uclibc versions
uClibc master branch, as well as uclibc-ng add eventfd_{read,write}
definitions. Instead of testing for __UCLIBC__, have cmake explicitly check
for the existence of eventfd_read and save the result in
WITH_EVENTFD_READ_WRITE.

Fixes build errors like:

.../winpr/libwinpr/synch/event.c:120:12: error: static declaration of 'eventfd_read' follows non-static declaration
 static int eventfd_read(int fd, eventfd_t* value)
            ^
In file included from .../winpr/libwinpr/synch/event.c:39:0:
.../usr/include/sys/eventfd.h:37:12: note: previous declaration of 'eventfd_read' was here
 extern int eventfd_read (int __fd, eventfd_t *__value);
            ^
.../winpr/libwinpr/synch/event.c:125:12: error: static declaration of 'eventfd_write' follows non-static declaration
 static int eventfd_write(int fd, eventfd_t value)
            ^
In file included from .../winpr/libwinpr/synch/event.c:39:0:
.../usr/include/sys/eventfd.h:40:12: note: previous declaration of 'eventfd_write' was here
 extern int eventfd_write (int __fd, eventfd_t __value);
2015-04-29 20:31:25 +03:00
Norbert Federa
ef1fd12b15 Fix unchecked CreateEvent calls and misc fixes
1)
Added missing checks for CreateEvent which also required the
following related changes:

- changed freerdp_context_new API to BOOL
- changed freerdp_peer_context_new API to BOOL
- changed pRdpClientNew callback to BOOL
- changed pContextNew callback to BOOL
- changed psPeerAccepted callback to BOOL
- changed psPeerContextNew callback to BOOL

2)
Fixed lots of missing alloc and error checks in the
changed code's neighbourhood.

3)
Check freerdp_client_codecs_prepare result to avoid segfaults
caused by using non-initialized codecs.

4)
Fixed deadlocks in x11 caused by missing xf_unlock_x11() calls
in some error handlers

5)
Some fixes in thread pool:
- DEFAULT_POOL assignment did not match TP_POOL definition
- don't free the pool pointer if it points to the static DEFAULT_POOL
- added error handling and cleanup in InitializeThreadpool
2015-04-29 18:18:39 +02:00
Norbert Federa
19dc7b7440 Merge pull request #2579 from akallabeth/mutex_debug_log
winpr mutex unlock on destroy
2015-04-29 18:04:59 +02:00
Armin Novak
b7fccafb94 Added EBUSY to success states. 2015-04-29 08:48:07 +02:00
Armin Novak
07ee198203 Better error handling on mutex destroy. 2015-04-28 17:31:27 +02:00
Hardening
bfccc06ab2 Merge pull request #2578 from jonathankap/master
Fix issue when numWindowIds is 0
2015-04-28 14:43:30 +02:00
Armin Novak
fe27913859 Ensuring mutex is unlocked on destroy. 2015-04-28 09:42:46 +02:00
Jonathan Kaplan
8dee5dab27 Fix issue when numWindowIds is 0 2015-04-28 00:21:38 -07:00
Armin Novak
ac15ce2da8 Added mutex debug flag.
When mutex debugging is enabled now a stack trace
is logged, if a mutex is locked on destruction.
2015-04-28 08:55:49 +02:00
Norbert Federa
3fb8bb7890 Merge pull request #2575 from bmiklautz/gdi_fix
gdi: fix problem with gdi_SelectObject check(s)
2015-04-27 09:34:13 +02:00
Bernhard Miklautz
ff11057d49 gdi: fix problem with gdi_SelectObject check(s)
When a hdc is created no initial or default objects are created
therefore can the first call of gdi_SelectObject return NULL.
Because of this checking the return value of  gdi_SelectObject failed
for newly create hdc causing errors (disconnects).

Since all types of HGDIOBJECT are handled and the return value of
gdi_SelectObject isn't used the recently added checks were removed
again.
2015-04-26 22:28:49 +02:00
Marc-André Moreau
1fea6bf702 Merge pull request #2568 from nfedera/fix-2015-04-23-01
codec/rfx: error checking and various fixes
2015-04-24 13:36:27 -04:00
Norbert Federa
5926bbcf48 codec/rfx: simplification, segfault/malloc fixes
rfx_process_message_sync:
- simplified the check if the header messages got processed

rfx_process_message_tileset:
- ObjectPool_Take result was not checked
- fail if TS_RFX_TILE block type is not CBT_TILE
- CreateThreadpoolWork result was not checked
- post decoding loop code segfaulted in error case

rfx_decoder_tile_new:
- missing malloc check

rfx_message_free:
- segfault protection

rfx_write_message_tileset:
- segfault protection
2015-04-24 17:54:49 +02:00
Bernhard Miklautz
15a2e6fbbb Merge pull request #2572 from bceverly/OpenBSD-2015-04-24
Added support for manpage construction for OpenBSD
2015-04-24 17:38:02 +02:00
Bryan Everly
18b335e2f2 Added support for manpage construction for OpenBSD 2015-04-24 08:38:35 -04:00
Norbert Federa
84577b1ca7 codec/rfx: error checking and various fixes
- removed some unneeded null checks for free()
- fixed a memory leak in shadow_client
- removed rfx_compose_message_header from API

Changed the following functions to BOOL, check the result
where they are called and handle failures:
- rfx_compose_message
- rfx_compose_message_header
- rfx_write_tile
- rfx_write_message_tileset
- rfx_write_message_frame_begin
- rfx_write_message_region
- rfx_write_message_frame_end
- rfx_write_message

rfx_process_message:
- check memory allocation failures
- verify protocol-conform order of data messages to prevents memory
  leaks caused by repeated allocations
- verify that header messages were parsed/received before the
  data messages
- treat unknown rlgr mode as error
- fixed/added error handling
- fixed all callers to check/handle result

rfx_encode_message:
- fixed incorrect usage of realloc
- missing malloc check
- missing check of CreateThreadpoolWork
- correct cleanup on failure (threadpool, memory)
- check rfx_encode_message result

rfx_encode_messages:
- check rfx_split_message result
- correct cleanup on failure
- prevent memory leak on failure

rfx_write_message_context:
- fixed invalid channelId value (must be 0xFF for WBT_CONTEXT)

rfx_process_message_codec_versions:
- fixed invalid read size of codec_version (it is 16bit)

rfx_process_message_channels:
- verify protocol conform channelId value

rfx_process_message_region:
- replaced invalid reallocs with malloc
- read and verify regionType and numTileSets from stream

rfx_process_message_tileset:
- check allocation results
- fixed incorrect usages of realloc

setupWorkers:
- fixed incorrect usages of realloc

rfx_split_message:
- removed dead code
- missing malloc check

rfx_compose_message:
- fixed a memory leak
- check/handle rfx_encode_message result
2015-04-23 15:42:21 +02:00
Bernhard Miklautz
e61620bd8e Merge pull request #2566 from bceverly/OpenBSD-2015-04-22
Further cleanup on the OpenBSD build
2015-04-22 18:44:25 +02:00
Bryan Everly
cb66f3ee70 Removed compiler warning about obsolete header file in OpenBSD 2015-04-22 09:50:50 -04:00
Bryan Everly
8f19bd1825 Moved declaration of OPENBSD to higher in the file to clean some things up. Also, removed -Wredundant-decls from OpenBSD because the OpenBSD standard include files have some redundant declarations that generate a large number of compiler warnings. 2015-04-22 09:19:04 -04:00
Bernhard Miklautz
d5e7314392 Merge pull request #2564 from akallabeth/pthread_mutex_timedjoin_detection
Fixed pthread_mutex_timedjoin detection.
2015-04-22 14:42:31 +02:00
Hardening
e144bbd56b Merge pull request #2555 from akallabeth/wayland_warning_fix
Updated wayland client to new API.
2015-04-22 13:33:12 +02:00
Armin Novak
7524ea53c6 Updated to new freerdp_get_event_handles API. 2015-04-22 11:17:47 +02:00
Armin Novak
a07d1c4b97 Updated wayland client to new API. 2015-04-22 11:16:41 +02:00
Norbert Federa
af79c30913 Merge pull request #2554 from akallabeth/event_fix
Fix for transport event reset
2015-04-22 11:04:37 +02:00
Hardening
6cd7713e12 Merge pull request #2544 from bmiklautz/boolenization
change return types of callbacks to BOOL
2015-04-22 11:01:27 +02:00
Bernhard Miklautz
159306fc7a Increase API version to 1.2.2 2015-04-22 10:23:25 +02:00
Armin Novak
5911332dfe Fixed pthread_mutex_timedjoin detection. 2015-04-22 09:32:59 +02:00
Hardening
f7ef37649c Merge pull request #2562 from bceverly/OpenBSD-2015-04-11
Open bsd 2015 04 11
2015-04-22 09:14:29 +02:00
Bryan Everly
d31301f73f Modified code to use bulitin pthread functions on OpenBSD 2015-04-21 16:14:56 -04:00
Bryan Everly
a2a1d06d9b Necessary changes to get latest branch working on OpenBSD 5.6 2015-04-21 14:44:02 -04:00