platform/upstream/freerdp.git
9 years agoDon't use unavailable C99 long double math functions
Baruch Siach [Sun, 3 May 2015 17:46:22 +0000 (20:46 +0300)]
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>
9 years agoMerge pull request #2584 from baruchsiach/fix-eventfd-2
Bernhard Miklautz [Thu, 30 Apr 2015 12:20:33 +0000 (14:20 +0200)]
Merge pull request #2584 from baruchsiach/fix-eventfd-2

Fix build with newer uclibc versions

9 years agoFix build with newer uclibc versions
Baruch Siach [Tue, 28 Apr 2015 06:30:45 +0000 (09:30 +0300)]
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);

9 years agoMerge pull request #2579 from akallabeth/mutex_debug_log
Norbert Federa [Wed, 29 Apr 2015 16:04:59 +0000 (18:04 +0200)]
Merge pull request #2579 from akallabeth/mutex_debug_log

winpr mutex unlock on destroy

9 years agoAdded EBUSY to success states.
Armin Novak [Wed, 29 Apr 2015 06:48:07 +0000 (08:48 +0200)]
Added EBUSY to success states.

9 years agoBetter error handling on mutex destroy.
Armin Novak [Tue, 28 Apr 2015 15:29:07 +0000 (17:29 +0200)]
Better error handling on mutex destroy.

9 years agoMerge pull request #2578 from jonathankap/master
Hardening [Tue, 28 Apr 2015 12:43:30 +0000 (14:43 +0200)]
Merge pull request #2578 from jonathankap/master

Fix issue when numWindowIds is 0

9 years agoEnsuring mutex is unlocked on destroy.
Armin Novak [Tue, 28 Apr 2015 07:42:46 +0000 (09:42 +0200)]
Ensuring mutex is unlocked on destroy.

9 years agoFix issue when numWindowIds is 0
Jonathan Kaplan [Tue, 28 Apr 2015 07:21:38 +0000 (00:21 -0700)]
Fix issue when numWindowIds is 0

9 years agoAdded mutex debug flag.
Armin Novak [Tue, 28 Apr 2015 06:55:26 +0000 (08:55 +0200)]
Added mutex debug flag.

When mutex debugging is enabled now a stack trace
is logged, if a mutex is locked on destruction.

9 years agoMerge pull request #2575 from bmiklautz/gdi_fix
Norbert Federa [Mon, 27 Apr 2015 07:34:13 +0000 (09:34 +0200)]
Merge pull request #2575 from bmiklautz/gdi_fix

gdi: fix problem with gdi_SelectObject check(s)

9 years agogdi: fix problem with gdi_SelectObject check(s)
Bernhard Miklautz [Sun, 26 Apr 2015 20:28:49 +0000 (22:28 +0200)]
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.

9 years agoMerge pull request #2568 from nfedera/fix-2015-04-23-01
Marc-André Moreau [Fri, 24 Apr 2015 17:36:27 +0000 (13:36 -0400)]
Merge pull request #2568 from nfedera/fix-2015-04-23-01

codec/rfx: error checking and various fixes

9 years agocodec/rfx: simplification, segfault/malloc fixes
Norbert Federa [Fri, 24 Apr 2015 15:54:49 +0000 (17:54 +0200)]
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

9 years agoMerge pull request #2572 from bceverly/OpenBSD-2015-04-24
Bernhard Miklautz [Fri, 24 Apr 2015 15:38:02 +0000 (17:38 +0200)]
Merge pull request #2572 from bceverly/OpenBSD-2015-04-24

Added support for manpage construction for OpenBSD

9 years agoAdded support for manpage construction for OpenBSD
Bryan Everly [Fri, 24 Apr 2015 12:38:35 +0000 (08:38 -0400)]
Added support for manpage construction for OpenBSD

9 years agocodec/rfx: error checking and various fixes
Norbert Federa [Thu, 23 Apr 2015 13:42:21 +0000 (15:42 +0200)]
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

9 years agoMerge pull request #2566 from bceverly/OpenBSD-2015-04-22
Bernhard Miklautz [Wed, 22 Apr 2015 16:44:25 +0000 (18:44 +0200)]
Merge pull request #2566 from bceverly/OpenBSD-2015-04-22

Further cleanup on the OpenBSD build

9 years agoRemoved compiler warning about obsolete header file in OpenBSD
Bryan Everly [Wed, 22 Apr 2015 13:50:50 +0000 (09:50 -0400)]
Removed compiler warning about obsolete header file in OpenBSD

9 years agoMoved declaration of OPENBSD to higher in the file to clean some things up. Also...
Bryan Everly [Wed, 22 Apr 2015 13:19:04 +0000 (09:19 -0400)]
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.

9 years agoMerge pull request #2564 from akallabeth/pthread_mutex_timedjoin_detection
Bernhard Miklautz [Wed, 22 Apr 2015 12:42:31 +0000 (14:42 +0200)]
Merge pull request #2564 from akallabeth/pthread_mutex_timedjoin_detection

Fixed pthread_mutex_timedjoin detection.

9 years agoMerge pull request #2555 from akallabeth/wayland_warning_fix
Hardening [Wed, 22 Apr 2015 11:33:12 +0000 (13:33 +0200)]
Merge pull request #2555 from akallabeth/wayland_warning_fix

Updated wayland client to new API.

9 years agoUpdated to new freerdp_get_event_handles API.
Armin Novak [Wed, 22 Apr 2015 09:05:29 +0000 (11:05 +0200)]
Updated to new freerdp_get_event_handles API.

9 years agoUpdated wayland client to new API.
Armin Novak [Mon, 20 Apr 2015 14:20:16 +0000 (16:20 +0200)]
Updated wayland client to new API.

9 years agoMerge pull request #2554 from akallabeth/event_fix
Norbert Federa [Wed, 22 Apr 2015 09:04:37 +0000 (11:04 +0200)]
Merge pull request #2554 from akallabeth/event_fix

Fix for transport event reset

9 years agoMerge pull request #2544 from bmiklautz/boolenization
Hardening [Wed, 22 Apr 2015 09:01:27 +0000 (11:01 +0200)]
Merge pull request #2544 from bmiklautz/boolenization

change return types of callbacks to BOOL

9 years agoIncrease API version to 1.2.2
Bernhard Miklautz [Wed, 22 Apr 2015 08:23:25 +0000 (10:23 +0200)]
Increase API version to 1.2.2

9 years agoFixed pthread_mutex_timedjoin detection.
Armin Novak [Wed, 22 Apr 2015 07:30:50 +0000 (09:30 +0200)]
Fixed pthread_mutex_timedjoin detection.

9 years agoMerge pull request #2562 from bceverly/OpenBSD-2015-04-11
Hardening [Wed, 22 Apr 2015 07:14:29 +0000 (09:14 +0200)]
Merge pull request #2562 from bceverly/OpenBSD-2015-04-11

Open bsd 2015 04 11

9 years agoModified code to use bulitin pthread functions on OpenBSD
Bryan Everly [Tue, 21 Apr 2015 20:14:56 +0000 (16:14 -0400)]
Modified code to use bulitin pthread functions on OpenBSD

9 years agoNecessary changes to get latest branch working on OpenBSD 5.6
Bryan Everly [Tue, 21 Apr 2015 18:44:02 +0000 (14:44 -0400)]
Necessary changes to get latest branch working on OpenBSD 5.6

9 years agoNecessary changes to get latest branch working on OpenBSD 5.6
Bryan Everly [Tue, 21 Apr 2015 18:42:06 +0000 (14:42 -0400)]
Necessary changes to get latest branch working on OpenBSD 5.6

9 years agoMerge pull request #2537 from MartinHaimberger/mh-autodetect-fix
Bernhard Miklautz [Tue, 21 Apr 2015 14:52:32 +0000 (16:52 +0200)]
Merge pull request #2537 from MartinHaimberger/mh-autodetect-fix

autodetect: debug fixed and level adjusted

9 years agoMerge pull request #2553 from akallabeth/leak_fixes
Bernhard Miklautz [Tue, 21 Apr 2015 14:49:02 +0000 (16:49 +0200)]
Merge pull request #2553 from akallabeth/leak_fixes

Leak fixes

9 years agoMerge pull request #2560 from akallabeth/get_event_handle_api_fix
Bernhard Miklautz [Tue, 21 Apr 2015 14:34:39 +0000 (16:34 +0200)]
Merge pull request #2560 from akallabeth/get_event_handle_api_fix

Add count to ```*_get_event_handles``` function

9 years agoChanged listener callback arguments and return.
Armin Novak [Tue, 21 Apr 2015 13:57:25 +0000 (15:57 +0200)]
Changed listener callback arguments and return.

9 years agoFixed handle copy and index.
Armin Novak [Tue, 21 Apr 2015 13:10:17 +0000 (15:10 +0200)]
Fixed handle copy and index.

9 years agoTestStream: set function parameters to void
Bernhard Miklautz [Tue, 21 Apr 2015 12:25:59 +0000 (14:25 +0200)]
TestStream: set function parameters to void

9 years agoFix formating
Bernhard Miklautz [Tue, 21 Apr 2015 12:15:53 +0000 (14:15 +0200)]
Fix formating

9 years agogdi: fix broken return type checks
Bernhard Miklautz [Mon, 20 Apr 2015 09:43:44 +0000 (11:43 +0200)]
gdi: fix broken return type checks

Integrates comments from pull request.

9 years agoFix GDI return values and other fixes
Bernhard Miklautz [Fri, 17 Apr 2015 14:21:55 +0000 (16:21 +0200)]
Fix GDI return values and other fixes

* top level GDI functions return 0 on error and != 0 otherwise but the
  low level functions (16bpp.c, 8bpp.c 32bpp.c) which are called did it
exactly the other way around. Those were adapted.
* change gdi_InvalidateRegion to BOOL and check calls where appropriate
* integrate comments from pull request

9 years agochange return types of callbacks to BOOL
Bernhard Miklautz [Tue, 14 Apr 2015 08:14:23 +0000 (10:14 +0200)]
change return types of callbacks to BOOL

* change all client/server callbacks to BOOL
* update all clients accordingly
* add multiple return value checks
* small fixes

9 years agoTestStream: fix compiler warning
Bernhard Miklautz [Tue, 14 Apr 2015 09:46:31 +0000 (11:46 +0200)]
TestStream: fix compiler warning

Remove unnecessary argument from read function call.

9 years agoios: updates to build with xcode6+
Bernhard Miklautz [Tue, 14 Apr 2015 09:43:24 +0000 (11:43 +0200)]
ios: updates to build with xcode6+

* update tool chain to use clang instead of gcc
* add compatibility function for fwrite

9 years agoFixed some type mismatches.
Armin Novak [Tue, 21 Apr 2015 10:35:55 +0000 (12:35 +0200)]
Fixed some type mismatches.

9 years agoAdd *get_event_handles handle count, return check.
Armin Novak [Tue, 21 Apr 2015 10:24:50 +0000 (12:24 +0200)]
Add *get_event_handles handle count, return check.

9 years agoModified GetEventHandles of listener
Armin Novak [Tue, 21 Apr 2015 10:09:44 +0000 (12:09 +0200)]
Modified GetEventHandles of listener

Now using nCount as in and out argument.
When called, set nCount to the number of available handles.
This value is checked and an error returned, if not enough
handles are available.

9 years agoMerge pull request #2558 from llyzs/llyzs
Norbert Federa [Tue, 21 Apr 2015 09:00:09 +0000 (11:00 +0200)]
Merge pull request #2558 from llyzs/llyzs

h264: change encoder api and add multi-thread support.

9 years agoh264: change encoder api and add multi-thread support.
Vic Lee [Tue, 21 Apr 2015 05:59:01 +0000 (13:59 +0800)]
h264: change encoder api and add multi-thread support.

9 years agoMerge pull request #2538 from MartinHaimberger/mh-add-transport-get-bytes
Bernhard Miklautz [Mon, 20 Apr 2015 16:34:13 +0000 (18:34 +0200)]
Merge pull request #2538 from MartinHaimberger/mh-add-transport-get-bytes

transport: added function to get bytes written

9 years agoMerge pull request #2552 from akallabeth/sample_update
Bernhard Miklautz [Mon, 20 Apr 2015 15:47:44 +0000 (17:47 +0200)]
Merge pull request #2552 from akallabeth/sample_update

Sample update

9 years agoFixed reading bitmap from buffer.
Armin Novak [Mon, 20 Apr 2015 13:13:23 +0000 (15:13 +0200)]
Fixed reading bitmap from buffer.

9 years agoUsing auto reset event now.
Armin Novak [Mon, 20 Apr 2015 12:43:37 +0000 (14:43 +0200)]
Using auto reset event now.

9 years agoAdded proper bitmap and png image test.
Armin Novak [Sun, 19 Apr 2015 10:29:28 +0000 (12:29 +0200)]
Added proper bitmap and png image test.

9 years agoFixed bitmap reading bug.
Armin Novak [Sun, 19 Apr 2015 10:29:17 +0000 (12:29 +0200)]
Fixed bitmap reading bug.

9 years agoUsing new API for socket listener.
Armin Novak [Sun, 19 Apr 2015 08:36:20 +0000 (10:36 +0200)]
Using new API for socket listener.

9 years agoMoved client handler to new API.
Armin Novak [Sun, 19 Apr 2015 08:31:28 +0000 (10:31 +0200)]
Moved client handler to new API.

9 years agoMoved cleanup code, removed unused.
Armin Novak [Sun, 19 Apr 2015 08:20:48 +0000 (10:20 +0200)]
Moved cleanup code, removed unused.

9 years agoUpdated sample for new API.
Armin Novak [Thu, 16 Apr 2015 07:04:19 +0000 (09:04 +0200)]
Updated sample for new API.

9 years agoMerge pull request #2547 from nfedera/fix-2015-04-16-01
Marc-André Moreau [Fri, 17 Apr 2015 13:03:46 +0000 (09:03 -0400)]
Merge pull request #2547 from nfedera/fix-2015-04-16-01

Fullscreen fixes and smart sizing resuscitation

9 years agoxfreerdp: fixed initial smart-sizing dimensions
Norbert Federa [Thu, 16 Apr 2015 21:54:56 +0000 (23:54 +0200)]
xfreerdp: fixed initial smart-sizing dimensions

The window width/height variables and in turn SmartSizingWidth/Height
get automatically updated in th the configure notify event handler.
If the window is created initially the values don't differ from the
event values and therefore SmartSizing was not applied until the
window was resized.

9 years agoFixed NULL dereference.
Armin Novak [Thu, 16 Apr 2015 20:04:38 +0000 (22:04 +0200)]
Fixed NULL dereference.

9 years agoFixed NULL dereference and double free
Armin Novak [Thu, 16 Apr 2015 19:56:57 +0000 (21:56 +0200)]
Fixed NULL dereference and double free

9 years agoFixed NULL dereference
Armin Novak [Thu, 16 Apr 2015 19:56:26 +0000 (21:56 +0200)]
Fixed NULL dereference

9 years agoFixed memory leaks and NULL dereferences.
Armin Novak [Thu, 16 Apr 2015 19:31:27 +0000 (21:31 +0200)]
Fixed memory leaks and NULL dereferences.

9 years agoxfreerdp: FS fixes & smart-sizing resuscitation
Norbert Federa [Thu, 16 Apr 2015 15:29:52 +0000 (17:29 +0200)]
xfreerdp: FS fixes & smart-sizing resuscitation

- make smart-sizing work again which was killed in previous commits
- removed several unnecessary/ugly workarounds
- miscellaneous small fixes
- new feature: restore previous window position when toggling out of
  fullscreen mode
- new feature: if /f is specified in combination with /smart-sizing:WxH
  we run the session in the /smart-sizing dimensions scaled to full screen

9 years agoxfreerdp: removed some weird/unnecessary code
Norbert Federa [Tue, 14 Apr 2015 15:59:06 +0000 (17:59 +0200)]
xfreerdp: removed some weird/unnecessary code

9 years agoxfreerdp: removed desktopWidth/desktopHeight vars
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

9 years agoxfreerdp: removed unused variables from xf_monitor
Norbert Federa [Tue, 14 Apr 2015 14:32:08 +0000 (16:32 +0200)]
xfreerdp: removed unused variables from xf_monitor

9 years agoxfreerdp: rename xf_context's width height vars
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.

9 years agoMerge pull request #2546 from akallabeth/error_fixes
Bernhard Miklautz [Thu, 16 Apr 2015 08:58:27 +0000 (10:58 +0200)]
Merge pull request #2546 from akallabeth/error_fixes

Fixed some warnings

9 years agoFixed uninitialized return value.
Armin Novak [Wed, 15 Apr 2015 08:38:04 +0000 (10:38 +0200)]
Fixed uninitialized return value.

9 years agoFixed NULL dereference.
Armin Novak [Wed, 15 Apr 2015 08:37:28 +0000 (10:37 +0200)]
Fixed NULL dereference.

9 years agoMerge pull request #2532 from dbungert/4bytestub
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

9 years agoMerge pull request #2539 from bmiklautz/fix/regression
Norbert Federa [Tue, 14 Apr 2015 11:50:33 +0000 (13:50 +0200)]
Merge pull request #2539 from bmiklautz/fix/regression

ObjectPool: fix regression

9 years agoObjectPool: 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

9 years agoautodetect: debug fixed and level adjusted
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

9 years agotransport: added function to get bytes written
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.

9 years agoMerge pull request #2517 from bmiklautz/alloc
Norbert Federa [Tue, 14 Apr 2015 09:57:33 +0000 (11:57 +0200)]
Merge pull request #2517 from bmiklautz/alloc

winpr allocation checks

9 years agoMerge pull request #2527 from AMV007/patch-1
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

9 years agoMerge pull request #2535 from akallabeth/null_dereference_fix
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.

9 years agoFixed broken pad setting.
Armin Novak [Mon, 13 Apr 2015 07:28:29 +0000 (09:28 +0200)]
Fixed broken pad setting.

9 years agoUpdate urbdrc_main.c
Maxim [Sun, 12 Apr 2015 11:51:27 +0000 (14:51 +0300)]
Update urbdrc_main.c

9 years agoGW RPC-HTTP - Don't drop 4 byte stub from the pipe
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.

9 years agoGW RPC-HTTP login fix
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.

9 years agofixed buffer overflow at sprintf
Maxim [Fri, 10 Apr 2015 12:44:27 +0000 (15:44 +0300)]
fixed buffer overflow at sprintf

9 years agofixed undefined behaviour of sprintf, buffer overflow
Maxim [Wed, 8 Apr 2015 15:21:52 +0000 (18:21 +0300)]
fixed undefined behaviour of sprintf, buffer overflow

9 years agoMerge pull request #2522 from realjiangms/fix_WriteLock_leak
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.

9 years agotransport_write sometimes returns directly without cleanup. Fix code path to always...
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.

9 years agowinpr: small fixes and cleanups
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

9 years agowinpr: fixes and cleanup
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

9 years agowinpr: add checks for *alloc
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.

9 years agocomm/tests: set label comm
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.

9 years agoaligned memory: fixes in _aligned_offset_recalloc
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

9 years agoMerge pull request #2513 from hardening/license_and_security_retValues
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

9 years agoMerge pull request #2512 from hardening/help2353
Bernhard Miklautz [Wed, 8 Apr 2015 08:35:32 +0000 (10:35 +0200)]
Merge pull request #2512 from hardening/help2353

Kill more exit() occurences

9 years agoTake in account @nfedera's comments
David FORT [Tue, 7 Apr 2015 19:06:53 +0000 (21:06 +0200)]
Take in account @nfedera's comments

9 years agoFix a too big Stream_EnsureRemainingCapacity()
David FORT [Tue, 7 Apr 2015 13:19:59 +0000 (15:19 +0200)]
Fix a too big Stream_EnsureRemainingCapacity()

9 years agoMerge pull request #2516 from bmiklautz/cmd_fix
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

9 years agoFix 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.