Commit Graph

59 Commits

Author SHA1 Message Date
asapelkin
82eadad4a4 Fix some static analizer warnings 2019-10-22 15:39:54 +02:00
Armin Novak
e42b15eb05 Fixed memory leak 2019-05-08 15:13:03 +02:00
Armin Novak
279a5fe39f Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak
2bd43398e8 Fixed sign-compare warning 2019-01-30 18:05:49 +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
0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
Armin Novak
09d43a66f4 Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
Armin Novak
99c45405cb Fixed GetEnvironmentVariable. 2017-03-03 12:43:00 +01:00
Armin Novak
9c64e77a84 Disabled thread local storage on iOS.
iOS does not support Thread Local Storage.
Disabling it for now until a solution is found.
Print a compiler warning informing developers about this issue.
2016-10-06 13:43:10 +02:00
Norbert Federa
e718fb324b fix race conditions, tests and some invalid return values
Since the current winpr implementation for overlapped operations is
incomplete and buggy, all affected functions will now fail if they are
called with a set FILE_FLAG_OVERLAPPED flag or a non-null pointer to
a OVERLAPPED structure.

winpr/nt:
- use proper one-time initialization on win32
- fix TestNtCreateFile
- fix broken/incomplete _RtlAnsiStringToUnicodeString
- unimplemented functions return appropriate error codes

winpr/pipe:
- improved TestPipeCreateNamedPipe
- rewrite the completely broken TestPipeCreateNamedPipeOverlapped test

rdtk:
- improve test and don't blindly return success

winpr/synch:
- fix race condition in TestSynchTimerQueue

winpr/ssspi:
- fix TestEnumerateSecurityPackages printf output
- fix TestQuerySecurityPackageInfo printf output

winpr/environment:
- fix GetEnvironmentStrings printf output

winpr/comm:
- unimplemented functions return appropriate error codes

winpr/io:
- unimplemented functions return appropriate error codes

winpr/thread:
- implement SwitchToThread() via sched_yield()
2016-06-01 16:26:26 +02:00
Marc-André Moreau
ceefc4b099 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-07 10:19:50 -05:00
Armin Novak
68c402ac58 Removed windows module.def files.
All symbols exported from libraries are declared
using *_API defines.
2016-02-29 15:18:47 +01:00
Marc-André Moreau
d0f413db12 winpr: initial port to Universal Windows Platform (UWP) 2016-02-05 16:28:45 -05:00
Bernhard Miklautz
c70559d128 winpr API: add EnvironmentBlockToEnvpA
* expose EnvironmentBlockToEnvpA
* cleanup includes in process.c
* removed unused "flag" variable in _CreateProcessExA
* make ProcessHandleCloseHandle static
2015-10-23 18:38:42 +02:00
MartinHaimberger
d4d360f6a4 Merge pull request #2859 from akallabeth/resource_leak_fix
Fixes API misuse and logic errors
2015-09-15 14:45:42 +02:00
Bernhard Miklautz
6b52a2e5cc winpr/file: initial regular file support
Add initial support for "regular" files. First implemented call is
GetStdHandle to get stdin/stdout/stderr.
2015-09-09 16:47:03 +02:00
Armin Novak
ce479e312a Fixed uninitialized environment block. 2015-09-03 13:37:16 +02:00
Armin Novak
6c74dbbe25 Reverted broken malloc size fix. 2015-09-02 13:57:04 +02:00
Armin Novak
6c288bd0f2 Fixed zero length allocation. 2015-09-01 12:25:43 +02:00
Armin Novak
205878383d Fixed array out of bound access. 2015-09-01 12:25:43 +02:00
Norbert Federa
1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +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
Zhang Zhaolong
ea67d8b1bc libwinpr: fix lost of mergeStrings.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-13 10:38:07 +08:00
Zhang Zhaolong
e30d1c0f47 libwinpr: fix incorrect usage of realloc.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 14:59:56 +08:00
Armin Novak
8640872161 Fixed mixed variable declaration. 2014-11-17 01:42:24 +01:00
Armin Novak
709435d6d7 Fixed memory leak. 2014-11-16 22:47:23 +01:00
Armin Novak
abeb29213f Fixed memory leak. 2014-11-16 17:21:36 +01:00
Armin Novak
37facc0d44 Fixed memory leak. 2014-11-16 16:05:01 +01:00
Armin Novak
b9908af64a Fixed memory leaks. 2014-11-16 16:02:28 +01:00
Armin Novak
77a3c0ca4a Fixed use after free. 2014-11-16 15:13:08 +01:00
Marc-André Moreau
c5c9423ccf winpr: fix Win32 build warnings 2014-11-04 10:44:55 -05:00
Marc-André Moreau
8ef4c14a6d libwinpr-environment: fix extended functions 2014-10-10 19:16:51 -04: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
Bernhard Miklautz
b817e92e5e cmake: mark required libraries for export 2014-04-23 10:16:02 +02:00
Bernhard Miklautz
02c4e261d1 winpr-env: update Get/SetEnvironmentVariableA
* set last error to ERROR_ENVVAR_NOT_FOUND in GetEnvironmentVariableA
  if not found
* remove unused variables in SetEnvironmentVariableA
* add more test cases
2014-04-17 11:48:50 +02:00
Martin Haimberger
a6c34c114e using setenv instead of putenv to prevent memleaks 2014-04-11 02:17:43 -07:00
Bernhard Miklautz
297247042d winpr-env: fix in GetEnvironmentVariableEBA
* also fix cases where the provided env block is NULL
2014-02-20 18:29:16 +01:00
Bernhard Miklautz
591a8192e0 winpr-env: fix in GetEnvironmentVariableEBA
GetEnvironmentVariableEBA didn't do exact matching of the requested variable name. If a variable
with similar but shorter name was set in the environment block it was returned.
For example if HOME was set in the environment block and HOMEX was requested the value of HOME was
returned.
2014-02-14 11:12:21 +01:00
Bernhard Miklautz
ee5814cbc2 winpr-env: extended GetSetEB ctest
Check if Get function only returns values for the exact variable name
2014-02-14 11:12:21 +01:00
Bernhard Miklautz
909800eca0 winpr: fixed problems Set/GetEnvironmentVariableEBA
* valgrind: fixed invalid read
* invalid or damaged environment blocked caused endless loop
* envblock created in SetEnvironmentVariableEBA lacked a trailing '\0'
  which could lead to a damaged environment block
2014-02-13 14:31:11 +01:00
Marc-André Moreau
62199fc46a Merge branch 'master' of github.com:FreeRDP/FreeRDP 2013-12-10 11:54:03 -05:00
Bernhard Miklautz
2b6b4a6685 updated file headers 2013-12-04 11:44:22 +01:00
Marc-André Moreau
cea8c08328 ifreerdp: fix iOS/OSX platform detection 2013-12-03 15:19:58 -05:00
Marc-André Moreau
d5f18e88cc libwinpr-environment: fix usage of environ on OS X 2013-12-03 00:52:02 -05:00
Marc-André Moreau
938d423ec9 freerdp: fix build on Windows 2013-10-30 17:56:44 -04:00
Marc-André Moreau
55565e056c freerdp: export targets 2013-10-28 23:06:39 -04:00
Marc-André Moreau
fb4ac3b5dd Merge pull request #13 from MartinHaimberger/EnvMerge
added merge function for environmentblocks
2013-10-24 11:04:09 -07:00
Martin Haimberger
8479462b5e changed the interface of SetEnvironmentVariableEBA 2013-10-23 03:43:06 -07:00
Martin Haimberger
fdacd898f5 MergeEnvironmentStrings works also for a null original env 2013-10-23 03:00:22 -07:00
Martin Haimberger
97ef519a54 added Set/GetEnvironmentVariableEBA
did some bugfixing within the MergeEnvironmentVariable
added Tests
2013-10-23 02:27:31 -07:00