Commit Graph

88 Commits

Author SHA1 Message Date
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
David FORT
29d372480a Take in account nfedera's review 2015-05-20 19:19:50 +02: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
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
Armin Novak
60de56e1bb Fixed NULL dereference and double free 2015-04-16 21:56:57 +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
Marc-André Moreau
cb002d91cd channels/smartcard: fix pioRecvPci with cbExtraBytes > 0 2015-03-13 14:20:57 -04:00
Marc-André Moreau
6b6c368e3a libwinpr-smartcard: stub new transaction system 2015-01-20 21:40:45 -05:00
Marc-André Moreau
344a1b52ca libwinpr-smartcard: remove unused (and useless) pcsc-lite static link option 2015-01-20 20:15:10 -05:00
Marc-André Moreau
f0fc27f7bd libwinpr-winscard: add WINPR_WINSCARD_LOCK_TRANSACTIONS environment variable, fix winpr_HexDump line feeds 2015-01-20 15:29:05 -05:00
Marc-André Moreau
73cfa920a9 libwinpr-smartcard: add SCARD_ATTR_CHANNEL_ID 2015-01-19 14:56:02 -05:00
Marc-André Moreau
51554ff16c channels: patch rdpdr/smartcard valgrind leaks, fix hang on disconnect 2014-12-28 14:56:13 -05:00
Marc-André Moreau
9ebc67ba02 channels/smartcard: cleanup SCardControl 2014-12-22 16:25:59 -05:00
Marc-André Moreau
0625be2720 channels/smartcard: fix SCardGetAttrib SCARD_AUTOALLOCATE support 2014-12-22 13:28:16 -05:00
Vincent Sourin
719e5c9cdb Determine OSX Version ... only on OSX 2014-12-14 15:15:33 +01:00
Vincent Sourin
8a028f78e2 * Determine OS X Version at runtime 2014-12-13 05:30:44 -08:00
Vincent Sourin
956cece54b * Correct detection of Mac OS X Yosemite Version 2014-12-09 22:14:06 +01:00
Vincent Sourin
64ff9ee1b6 SmartCard
* Check for NULL parameters in PCSC_ConvertReaderNameToWinSCard (Issue #2184)
* Remove masking of dwEventState as it is not needed under Linux and MacOSX and it helps in ThinLinc environment
* Workaround for Mac OS X Yosemite (10.10) SCardStatus Bug (Issue #2184)
* Since Mac OS Tiger (10.5.6), Apple introduced new function for SCardControl calls named SCardControl132(), the old SCardControl doesn't work (cf. https://opensource.apple.com/source/SmartCardServices/SmartCardServices-55111/src/PCSC/winscard_clnt.c)
2014-12-09 20:14:57 +01:00
Armin Novak
55e455f1ab Fixed memory leaks. 2014-11-16 22:50:50 +01:00
Armin Novak
b7d5bf49f8 Fixed NULL pointer dereference. 2014-11-16 16:53:55 +01:00
Marc-André Moreau
367ceff02c libwinpr-smartcard: revert minor change from pull request #2195 2014-11-11 12:00:37 -05:00
Marc-André Moreau
d4bdf52b07 libwinpr-smartcard: re-enable SCardGetStatusChange status filtering 2014-11-11 11:46:59 -05:00
Vinche
d427faf5c6 Cleaning Code 2014-11-10 23:51:34 +01:00
Vinche
fdb95c712b Implementation for Smartcard Reader with Pin Pad 2014-11-10 23:40:22 +01:00
Vinche
69766de29f Add comments to modifications 2014-11-09 23:02:12 +01:00
Vinche
bbff8db75f Add comments to modifications 2014-11-09 23:00:41 +01:00
Vinche
2708a8de5c first commit 2014-11-09 22:42:35 +01:00
Armin Novak
a15df299e9 Removed last remainig printf. 2014-09-09 16:32:23 +02: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
Marc-André Moreau
659f80e172 libwinpr-smartcard: avoid using pcsc-lite's buggy transaction system 2014-06-02 21:49:49 -04:00
Marc-André Moreau
f5bfb98aca channels/smartcard: experiment with multiple card contexts 2014-06-02 17:20:01 -04:00
Mike McDonald
ed8ea297e7 Modified SCardConnect/SCardDisconnect logic to prevent more than one card from being connected to a context. Trying to connect more than once to a context without doing a disconnect can cause a deadlock in the pcsclite daemon (pcscd). 2014-06-02 11:08:32 -04:00
Marc-André Moreau
003870157a libwinpr-smartcard: remove some locks 2014-05-12 17:28:35 -04:00
Marc-André Moreau
2da6111972 channels/smartcard: fix clearing of rgSCardContextList 2014-05-12 10:17:49 -04:00
Marc-André Moreau
ae6c778eb7 libwinpr-smartcard: modifying threading 2014-05-11 05:23:30 -04:00
Marc-André Moreau
fda492c58d libwinpr-smartcard: fix AccessStartedEvent 2014-05-11 01:53:47 -04:00
Marc-André Moreau
d04430cb02 channels/smartcard: implement usage of SCardAccessStartedEvent 2014-05-10 23:43:25 -04:00
Marc-André Moreau
b3114ff4d8 channels/smartcard: improve debug output, fix GetStatusChange SCARD_E_CANCELLED, fix SCardGetAttrib current protocol type 2014-05-06 10:00:44 -07:00
Marc-André Moreau
38c77eb57c libwinpr-smartcard: fix SCardGetAttrib for friendly name (unicode) 2014-05-05 17:27:29 -04:00
Marc-André Moreau
9e407e6e22 libwinpr-smartcard: start handling SCardControl control code conversions 2014-05-03 19:02:17 -04:00
Marc-André Moreau
b51da6c6f4 libwinpr-smartcard: improve SCardGetAttrib, fix null SCARDCONTEXT usage in SCardListReaders 2014-05-03 17:07:30 -04:00
Marc-André Moreau
86b018ee21 libwinpr-smartcard: fix pcsc-lite SCARD_IO_REQUEST incompatibility 2014-05-03 14:20:17 -04:00
Marc-André Moreau
cd7e3151cd libwinpr-smartcard: fix PCSC incompatible type definitions 2014-05-03 13:49:50 -04:00
Marc-André Moreau
b1c0a68f55 client/common: honor RedirectSmartCards, RedirectPrinters 2014-04-27 21:29:44 -04:00
Marc-André Moreau
c9a223a06b libwinpr-smartcard: return SCARD_NO_SERVICE when no internal callback is registered 2014-04-27 20:11:31 -04:00
Marc-André Moreau
5db851a154 libwinpr-smartcard: update PCSC-WinPR instructions (WIP) 2014-04-27 17:38:45 -04:00
Marc-André Moreau
103b7d4151 libwinpr-smartcard: fix workaround for lack of PnP Notification support on OS X 2014-04-27 16:43:09 -04:00