Commit Graph

75 Commits

Author SHA1 Message Date
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
Norbert Federa
f9f59cd29b Fix unchecked CreateDirectory calls 2015-05-07 13:28:13 +02: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
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
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
Armin Novak
b3ea02a777 Removed INVALID_HANDLE_VALUE from types not using it. 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
Bernhard Miklautz
3c7662517c hardening
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
Armin Novak
54cb89f303 Fixed pipe cleanup. 2015-03-23 14:10:49 +01:00
David FORT
552df08926 Implement ReadFile() and WriteFile() as handle operation 2015-03-16 21:29:19 +01:00
David FORT
bfb8593590 Fixed the test for named pipe creation
All credits goes to @akallabeth.
2015-03-16 11:19:45 +01:00
David FORT
a9020a34c2 Changes for upstream changes on pipe 2015-03-16 10:40:38 +01:00
David FORT
52bd4469d9 Make handle operations static
This patch moves the handle operations in a static struct.
2015-03-16 10:31:26 +01:00
Armin Novak
2d5bdcf3bb Proper default values for fds. 2015-03-14 00:49:49 +01:00
Armin Novak
0201f61d19 Fixed missing callbacks for named pipes. 2015-03-14 00:34:44 +01:00
Armin Novak
98b0f37020 Initializing handles with calloc now. 2015-03-11 18:09:22 +01:00
Armin Novak
0630ad88b5 Using new handle cleanup structure 2015-03-11 17:57:01 +01:00
Armin Novak
a6f27f48ea Using handle close callback now. 2015-03-11 15:11:03 +01:00
Hardening
5dddd977f2 Check return value for fcntl() 2015-02-10 10:08:39 +01:00
Armin Novak
9903c87ed2 Prettiefied WLog messages. 2015-01-20 11:05:18 +01:00
Armin Novak
58d1853de7 Fixed missing return check. 2014-11-16 15:25:10 +01:00
Armin Novak
b22b897389 Reformatted changed files. 2014-09-09 16:32:22 +02:00
Armin Novak
7e3a1b3073 Now using macro to generate module specific log tag. 2014-09-09 16:32:04 +02:00
Armin Novak
28ece6bb46 Replaced stdio logging with WLog 2014-09-09 16:31:46 +02:00
Bernhard Miklautz
6a49bcfe40 winpr: always build "monolitic"
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.

The only exception is winpr-makecert-tool which is still build as extra
library.

This obsoletes complex_libraries for winpr.
2014-07-10 11:10:58 +02:00
Marc-André Moreau
a07f616895 libwinpr-sspi: improve link interface 2014-06-07 10:50:51 -04:00
Norbert Federa
5d82ff3c5d winpr: fixed non monolithic build issue 2014-05-28 16:22:32 +02:00
Norbert Federa
aa2efaf573 winpr: rewrite named pipe sharing
Since commit 5e09e37d42 was basically unfixable,
here is a slightly different approach that should hopefully solve all
discovered issues and race conditions.
2014-05-28 13:54:08 +02:00
Martin Haimberger
c958f81016 fixed introduced winpr bug in namedpipes
Bug was introduced by 5e09e37d42
2014-05-26 03:04:22 -07:00
Marc-André Moreau
a202fe4057 freerdp: fix several type related warnings 2014-05-08 18:02:02 -04:00
Marc-André Moreau
06d36c7084 libwinpr-pipe: fix circular dependency 2014-05-08 17:17:39 -04:00
Marc-André Moreau
4dc6ffdaaa Merge branch 'awakecoding' of github.com:vworkspace/FreeRDP
Conflicts:
	winpr/libwinpr/pipe/pipe.c
2014-05-08 16:38:21 -04:00
Zhang Zhaolong
dcbf5bd0ed libwinpr: fix memory leak in case of error. 2014-04-26 11:53:08 +08:00
Bernhard Miklautz
b817e92e5e cmake: mark required libraries for export 2014-04-23 10:16:02 +02:00
Mike McDonald
b9d5687e99 Added initializer for global BaseNamedPipeList per code review. 2014-04-18 15:11:26 -04:00
Mike McDonald
d8c1133201 Changes to named pipe functions based on code review. 2014-04-18 14:02:44 -04:00
Mike McDonald
5e09e37d42 Modified named pipes to support multiple instances (i.e., multiple calls to CreateNamedPipe with the same pipe name). 2014-04-18 13:16:42 -04:00
Bernhard Miklautz
adff58f48d winpr/pipe: fix variable type - unsigned to signed
fcntl returns int. Comparison to 0 < always returned false.
2014-04-17 10:02:41 +02:00
Marc-André Moreau
1697469ced libwinpr-file: implement further AIO-based overlapped I/O 2014-02-17 13:02:39 -05:00
Hardening
0129875bf2 Print human readable messages
Log why the pipe creation failed helps
2014-02-07 15:17:05 +01:00
Marc-André Moreau
55565e056c freerdp: export targets 2013-10-28 23:06:39 -04:00
Bernhard Miklautz
bab5c22f9e winpr-pipe: fixed memory leak in WaitNamedPipeA 2013-10-15 13:09:13 +02:00
Marc-André Moreau
8695c5226b libwinpr-file: added more error checking 2013-10-01 12:03:08 -04:00
Marc-André Moreau
480071cdeb libwinpr-io: improve overlapped io with server-side named pipes 2013-09-25 23:16:33 -04:00
Marc-André Moreau
f4e98f29ec libwinpr-pipe: add server-side named pipe waiting 2013-09-25 19:13:39 -04:00
Marc-André Moreau
979ed1b756 libwinpr-pipe: implement WaitNamedPipe 2013-09-23 18:10:21 -04:00
Marc-André Moreau
518995a05e freerdp: merge with master 2013-09-16 17:10:27 -04:00
Armin Novak
e5c138a5b9 Fixed various memory leaks, allocation size issues and API misuse
warnings shown by clang as well as some compiler warnings.
2013-09-05 12:14:34 +02:00
Armin Novak
64c3aafcc6 Fixed coverity issue 1047602 2013-09-05 12:14:32 +02:00