akallabeth
66dc4cc9ee
Fixed compilation warnings.
2020-11-10 08:53:43 +01:00
akallabeth
59ef9a7e8b
Fixed reset of MessageQueue in Clear
2020-11-06 13:02:01 +01:00
akallabeth
6e3c00725a
Cleaned up collections:
...
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
akallabeth
a5989429f7
Reset Queue_Event when Queue_Clear is called.
2020-11-05 15:32:17 +01:00
Martin Fleisz
b5fa928311
core: Fix race when deleting channel manager
...
This PR fixes a possible crash when the channel manager was freed and
there were pending messages in the message queue.
The problem was that even though the message queue already received the
WMQ_QUIT message, it was still possible to enqueue messages after this
point. This resulted in unprocessed messages in the queue when it was
deleted. The delete handler then called into channel handlers which
where aleady freed/deleted.
With this PR adding messages after WMQ_QUIT was posted to the message
queue returns an error and all channel messages are now processed before
the channels are closed/terminated.
2020-11-03 17:08:58 +01:00
akallabeth
516fc9b910
Fixed locking issue, removed broken functions
2020-11-02 09:23:11 +01:00
akallabeth
0f2a8f214a
Unify StreamPool locking.
2020-10-30 10:17:27 +01:00
Armin Novak
6351885488
Ignore NULL streams in StreamPool_Return
2020-09-02 10:09:48 +02:00
Patrick Chin
8515846317
MessageQueue write time to current message not the next
2020-06-09 08:51:53 +02:00
akallabeth
58ef235bc5
Removed unused variable warnings
2020-05-20 15:10:07 +02:00
Armin Novak
24a8a56694
Fixed #6202 : Missing NULL checks
2020-05-20 15:02:24 +02:00
Armin Novak
50278f7076
Fixed #6201 : event handler count check
2020-05-20 15:02:24 +02:00
akallabeth
7b1d440945
Refactored StreamPool
2020-05-13 17:11:17 +02:00
akallabeth
8d70a3492b
Added warning to all collection structs
2020-05-12 14:05:28 +02:00
akallabeth
844ec8f74c
Fixed #6136 : Cleaned up Stack API
2020-05-12 14:05:28 +02:00
qarmin
ceec2cf1a0
Fixed copy paste error in MessagePipe.c
2020-05-01 19:42:46 +02:00
Armin Novak
94f0dc127b
Removed unused functions / files
2020-03-10 14:04:53 +01:00
Armin Novak
7c243da6e1
Remove symbols exported by accident.
2019-12-02 10:57:31 +01:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
Armin Novak
2813d6860c
Added MessageQueue_Dispatch argument checks
2019-10-25 13:25:12 +02:00
Armin Novak
f93d625cde
Use GetTickCount64 instead of GetTickCountPrecise.
2019-09-02 15:46:36 +02:00
kubistika
da19457fca
winpr: ObjectPool_Return: fix error handling
2019-07-11 21:31:47 +02:00
kubistika
e1850cbc6f
winpr: ObjectPool_Return: fix wrong type for new_cap
2019-07-11 21:31:47 +02:00
Armin Novak
982ee67a4c
Initialize ppKeys to NULL in HashTable_GetKeys
...
Ensure ppKeys=NULL in case of a function failure or empty table.
2019-02-26 15:32:22 +01:00
Armin Novak
3679eefbd4
Fixed BipBuffer Read/Write, limit to SSIZE_MAX.
2019-01-30 18:05:49 +01:00
Armin Novak
585391dfbf
Fixed sign-compare warning
2019-01-30 18:05:49 +01:00
Martin Fleisz
7b0f4f5dc4
Merge pull request #4907 from akallabeth/transport_write_leak_fix
...
Transport write leak fix
2018-10-29 14:54:55 +01:00
Norbert Federa
0572572eb9
fix issue with fnObjectFree and related casts
...
- remove unnecessary/dangerous OBJECT_xxx function-style casts
- fix -Wstrict-prototypes issue with OBJECT_NEW_FN definition
2018-10-19 11:30:01 +02:00
Armin Novak
554e18780b
USe const compare function pointer arguments
2018-10-18 09:06:55 +02:00
Armin Novak
3416d1bdee
Reset stream length to capacity in StreamPool_Take
2018-10-17 14:54:53 +02:00
Sébastien Duquette
2497fcf941
Use fnObjectEquals in ArrayList_Remove.
2018-10-04 16:57:29 -04:00
Armin Novak
b77dc13b5f
Implemented linked list compare and value copy functions.
2018-08-22 12:39:11 +02:00
Armin Novak
855dc9abaf
Clear message queue on free.
2018-02-09 10:29:18 +01:00
Armin Novak
7305828122
Fix #4239 : Various memory leaks
...
* Fixed all tests, now can be run with -DWITH_ADDRESS_SANITIZER=ON compiled.
* Enabled address sanitizer for nightly builds.
2017-12-12 11:40:48 +01:00
Armin Novak
bcfa434da2
Fixed resizing of PubSub
2017-09-25 13:33:04 +02:00
Armin Novak
0490aeb018
Fixed clang malloc integer overflow warnings.
2017-07-20 09:29:48 +02:00
Alexander Zakharov
3f139108ff
Fix Stack_Peek
2017-03-13 15:45:27 +03:00
pony
a57adc3fde
libwinpr-utils: fix 3 logic errors
2017-02-15 10:08:53 +01:00
Marc-André Moreau
915b9a15b1
Merge branch 'master' of github.com:FreeRDP/FreeRDP
...
Conflicts:
winpr/libwinpr/bcrypt/CMakeLists.txt
2016-05-11 11:05:17 -04:00
Armin Novak
ee186bec73
ListDictionary handle NULL list argument.
2016-04-26 09:34:12 +02:00
Marc-André Moreau
d0f413db12
winpr: initial port to Universal Windows Platform (UWP)
2016-02-05 16:28:45 -05: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
6698e24228
Fixed leaks, NULL dereferences and broken init.
2015-06-23 21:29:21 +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
David FORT
12f873f1f9
Fixed MessageQueue and callers
2015-05-29 14:24:14 +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
1eff1a345e
free can handle NULL perfectly fine
2015-05-11 09:07:39 +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
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