Commit Graph

384 Commits

Author SHA1 Message Date
Bryan Everly
bd149a284d Cleaned up previous OpenBSD change per recommendation 2015-09-14 13:20:11 -04:00
Armin Novak
5cad081cc8 Fixed memory leak. 2015-08-28 11:07:25 +02:00
Martin Haimberger
008d9f3b79 fixed misc *_free functions to accept NULL
Following types of collections support now
NULL in the free call:

* ArrayList
* BitStream
* ContdownEvent
* Dictionary
* KeyValuePair
* MessageQueue
2015-07-30 07:02:36 -07:00
Armin Novak
cf9f975341 Replaced snprintf with sprintf_s 2015-07-03 13:26:15 +02:00
Armin Novak
7dc96c412f Added convenience function winpr_log_backtrace. 2015-07-03 09:22:02 +02:00
Armin Novak
78eeb861d5 Fixed mixed declarations and code. 2015-07-01 16:20:56 +02:00
Bernhard Miklautz
1cee185e3c hardening: check fread and fwrite return values 2015-06-26 20:38:30 +02:00
Armin Novak
6ed7b7b4b3 Fixed a resource leak. 2015-06-24 09:29:52 +02:00
Armin Novak
f177430acc Fixed a resource leak. 2015-06-24 09:29:13 +02:00
Armin Novak
6698e24228 Fixed leaks, NULL dereferences and broken init. 2015-06-23 21:29:21 +02:00
Bernhard Miklautz
06502e6a91 misc: integrate pull request feedback 2015-06-22 19:24:30 +02:00
David FORT
16d36e3083 A malloc() pass on WinPR
This patch treats remaining non-checked mallocs. And changes to calloc in places
where it makes sense
2015-06-22 19:10:00 +02:00
Bernhard Miklautz
bf73f4e4f1 Fix unchecked strdups
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Armin Novak
7403cdc60c Added PathMakePath function. 2015-06-09 13:16:28 +02:00
Armin Novak
c6c43d5f06 Writing failure to stderr. 2015-06-02 17:54:27 +02:00
Armin Novak
1c3b38f58b Fixed image test. 2015-06-02 17:53:16 +02:00
Armin Novak
2a3cd74c02 Fixed image test. 2015-06-02 15:17:54 +02:00
David FORT
12f873f1f9 Fixed MessageQueue and callers 2015-05-29 14:24:14 +02:00
Martin Haimberger
951a2d2210 stream: check stream_new in winpr and libfreerdp
also fixed a few things
2015-05-29 04:46:50 -07:00
Marc-André Moreau
5526348079 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-05-21 13:29:59 -04:00
Marc-André Moreau
c64be497b8 libwinpr-utils: update backtrace utils 2015-05-21 13:25:35 -04:00
Marc-André Moreau
7e1dbd505b Merge branch 'awakecoding' of https://github.com/vworkspace/FreeRDP
Conflicts:
	channels/rdpdr/server/rdpdr_main.c
2015-05-20 11:40:48 -04:00
Marc-André Moreau
29d14773c8 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	client/Windows/wf_client.c
	libfreerdp/common/assistance.c
2015-05-20 10:12:24 -04:00
Hardening
f8120919af Add checks for some XXX_New and XXX_Add functions
Based on PR #2616
2015-05-18 11:28:00 +02:00
Norbert Federa
1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
Bernhard Miklautz
d4df3a952b Merge pull request #2594 from baruchsiach/fix-math-2
Don't disable C99 long double math on non Unix platforms
2015-05-08 13:44:26 +02:00
Bernhard Miklautz
81568ff03a Merge pull request #2596 from akallabeth/wlog_default_out_fix
Wlog console output to stderr
2015-05-08 00:49:41 +02:00
Marc-André Moreau
87bb3aa6e0 wfreerdp: fix build 2015-05-07 13:35:39 -04:00
Norbert Federa
f9f59cd29b Fix unchecked CreateDirectory calls 2015-05-07 13:28:13 +02:00
Norbert Federa
c77def3048 Fix unchecked CreateMutex calls 2015-05-07 13:27:49 +02:00
Armin Novak
1d3e847f12 Fixed broken indent. 2015-05-06 15:37:55 +02:00
Armin Novak
c0fbaa579b Not writing messages if level is WLOG_OFF. 2015-05-06 10:58:57 +02:00
Armin Novak
c375071b5d Console logging to stdout and stderr
With this patch the default for the console logger
changes to writing to stdout for TRACE, DEBUG and INFO
messages and stderr for WARNING, ERROR and FATAL messages.
2015-05-06 10:56:30 +02: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
Baruch Siach
81fc2c9740 Don't disable C99 long double math on non Unix platforms
CMakeLists.txt may enable HAVE_MATH_C99_LONG_DOUBLE only on Unix platforms.
Limit the effect of this symbol accordingly.
2015-05-05 21:27:17 +03: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
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
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
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
c9ee30a815 TestStream: set function parameters to void 2015-04-21 14:25:59 +02:00
Bernhard Miklautz
61473923e4 TestStream: fix compiler warning
Remove unnecessary argument from read function call.
2015-04-21 14:16:33 +02:00
Armin Novak
ad41fc59a3 Fixed reading bitmap from buffer. 2015-04-20 15:13:23 +02:00
Armin Novak
7990ea6371 Added proper bitmap and png image test. 2015-04-19 12:29:28 +02:00
Armin Novak
e5cdd8a299 Fixed bitmap reading bug. 2015-04-19 12:29:17 +02:00
Armin Novak
813e75e14d Fixed NULL dereference. 2015-04-16 22:04:38 +02:00
Armin Novak
276757c082 Fixed NULL dereference 2015-04-16 21:56:26 +02:00
Armin Novak
0d9bcb63b7 Fixed memory leaks and NULL dereferences. 2015-04-16 21:39:25 +02:00
Bernhard Miklautz
1093f647d3 ObjectPool: fix regression
winpr allocation checks introduced a problem that lead to zero size
allocations in ObjectPool
2015-04-14 13:47:23 +02:00
Bernhard Miklautz
a8c44f15c0 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
2015-04-08 11:34:37 +02:00