MartinHaimberger
46b1e88a70
Merge pull request #5027 from akallabeth/wlog_off_fix
...
Fix #5024 : Update inherited log level for all child loggers when setting a new one.
2019-02-28 10:55:12 +01:00
Armin Novak
e9c4173c9b
Fixed winpr_HexLogDump line length calculation.
2019-02-28 09:54:05 +01:00
Armin Novak
bff5ded654
Better bounds checks for winpr_HexLogDump
2019-02-28 08:50:44 +01: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
32aa11251b
Added a logger dump function operating on a preallocated logger.
2019-02-26 15:31:47 +01:00
Armin Novak
49936a7ba6
Fixed #5276 : Enable SSL before parsing assistance file.
...
The assistance file requires primitives from the ssl wrapper.
Enable these before parsing the file.
Additionally split the FIPS mode enablement from the one time
initializer to avoid ignoring that flag.
2019-02-25 10:37:30 +01:00
Armin Novak
9566ae0e90
Fixed mac compilation warnings.
2019-02-21 17:30:12 +01:00
Martin Fleisz
3169b77d70
Merge pull request #5230 from akallabeth/sign_compare_fixes
...
Sign compare fixes
2019-02-08 09:35:50 +01:00
Martin Fleisz
6415cfec48
Merge pull request #5131 from akallabeth/cmd_line_error_logging
...
Added extended error logging for assistance, rdp file and command line parser
2019-02-08 09:11:35 +01:00
Armin Novak
3679eefbd4
Fixed BipBuffer Read/Write, limit to SSIZE_MAX.
2019-01-30 18:05:49 +01:00
Armin Novak
221cb48e2d
Fixed sign-compare warning
2019-01-30 18:05:49 +01:00
Armin Novak
585391dfbf
Fixed sign-compare warning
2019-01-30 18:05:49 +01:00
Armin Novak
fe9dcfacca
Fixed NULL dereferences and uninitialized values
2019-01-30 16:11:10 +01:00
Armin Novak
9033df501e
Fixed compiler warnings for TRIO_CONST and limited data type.
2019-01-29 17:51:44 +01:00
akallabeth
0a8ebcfcac
Merge pull request #5187 from astrand/mingw-part1
...
Mingw build fixes part1
2019-01-29 10:46:21 +01:00
Armin Novak
4d4f3617bd
Fixed memory leak in lodepng.
2019-01-16 15:23:12 +01:00
Armin Novak
fc9e88d64f
Added flag to silence command line parser logging during detection.
2019-01-16 14:32:19 +01:00
Armin Novak
89f3f7d837
Added extended error logging for assistance, rdp file and command line parser.
2019-01-16 14:32:19 +01:00
Peter Åstrand (astrand)
30cd1ba1ab
Use lowercase for includes and libs
...
Makes build possible on case sensitive systems such as MinGW on Linux.
2019-01-09 09:36:28 +01:00
Martin Fleisz
7bc69cd61e
Merge pull request #5155 from akallabeth/ext_debug_functions
...
Added backtrace function working on allocated logger.
2019-01-08 10:18:06 +01:00
Ilya Shipitsin
f422fe63cf
identical code for both branches, found by coverity
2019-01-07 23:01:31 +05:00
Armin Novak
5dea64a468
Added backtrace function working on allocated logger.
2018-12-17 09:24:57 +01:00
Armin Novak
617c00c8f5
WLog_IsLevelActive is now a exported function istead of inline.
...
Since this function calls WLog_GetLogLevel anyway better only
export the API to allow internal checks to be modified in the
future without breaking API
2018-11-22 16:34:38 +01:00
Armin Novak
28f51efe9c
Fixed update of log filters in case of level change.
2018-11-19 13:04:40 +01:00
Armin Novak
37a01a19d8
Fix #5024 : Update inherited log level for all child loggers when setting a new one.
2018-11-19 12:19:12 +01:00
Armin Novak
a2cd934184
Fixed windows build warnings.
2018-11-15 09:01:53 +01:00
Ilya Shipitsin
77323d6f1d
remove not needed check
...
PVS analyzer: A part of conditional expression is always true: DomainMatch.
2018-11-15 01:54:39 +05:00
Bernhard Miklautz
472f7ea936
fix [winpr/util]: memory leak in TestCmdLine
2018-11-05 12:29:06 +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
Armin Novak
fffd352f83
Fixed warnings in Stream test.
2018-10-25 15:52:12 +02:00
akallabeth
16d37b1a17
Merge pull request #4932 from hardening/stream_static
...
winpr: add some functions to use wStream in a static way
2018-10-22 21:16:36 +02: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
David Fort
13e2a8834d
winpr: add some functions to use wStream in a static way
...
It's sometime useful to create a stream aliasing a buffer on the stack, and
it's nice if we don't need some extra malloc for this.
Example use:
BYTE buffer[20];
wStream s;
Stream_StaticInit(&s, buffer, sizeof(buffer));
Stream_Write_UINT16(&s, 0xff01);
Stream_Free(&s, FALSE);
2018-10-17 19:07:48 +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
a0f42280c3
Check if a boolean or flag argument has additional data.
...
Treat it as an error.
2018-09-28 12:59:20 +02:00
Martin Fleisz
0afba58405
Merge pull request #4814 from akallabeth/linked_list_add_object
...
Linked list add object for user defined functions
2018-08-24 08:37:41 +02:00
Ondrej Holy
10b9c516f6
winpr/utils/wlog: Fix leak found by covscan
...
leaked_storage: Variable "result" going out of scope leaks the storage it points to.
leaked_storage: Variable "bt" going out of scope leaks the storage it points to.
2018-08-23 09:11:24 +02:00
Ondrej Holy
d3c2ceb0f6
winpr/utils/wlog: Format code by astyle
...
Run ./scripts/format_code.sh before the following changes.
2018-08-23 09:11:24 +02:00
Ondrej Holy
4813a70897
winpr/utils/ntlm: Prevent releasing function argument
...
The patch changes API of functions instead of fixing unused and broken code.
freed_arg: "free" frees parameter "NtHash".
2018-08-23 09:11:24 +02:00
Ondrej Holy
1c1d00aac0
winpr/utils/ntlm: Format code by astyle
...
Run ./scripts/format_code.sh before the following changes.
2018-08-22 14:34:02 +02:00
Armin Novak
b77dc13b5f
Implemented linked list compare and value copy functions.
2018-08-22 12:39:11 +02:00
Armin Novak
0352dc3d6c
Fixed invalid format string.
2018-08-01 12:56:18 +02:00
Pascal J. Bourguignon
17a3782d1a
FIX: moved declarations above the statements for strict C 90 compliance.
2018-06-07 13:29:44 +02:00
Pascal J. Bourguignon
15f2bafeab
Cleaned up const char** -> char** for argv, since we definitely do modify the argv!
...
(we overwrite the password and pin arguments).
This implies changes in the argument parsing tests that now must pass a mutable argv
(copied from the statically declared test argvs).
Some other const inconsistency have been dealt with too.
2018-06-06 16:43:09 +02:00
Armin Novak
5a5b5eb6dd
Fixed loadepng memory leak.
2018-05-15 14:30:35 +02:00
Armin Novak
6e958e7edb
Fix #4628 : CommandLineFindNextArgumentA must check the current argument
...
When determining if there is a next argument first check the current one
for abort criteria.
2018-05-06 10:49:05 +02:00
Kyle Evans
2fb992a962
Upstream the rest of our local FreeBSD patching
...
FreeBSD/DragonflyBSD are also UNIX platforms, as far as trio is concerned, and
we don't need to be setting the CMAKE_INSTALL_RPATH on FreeBSD.
2018-05-02 22:09:42 -05:00
Kyle Evans
f8c391876f
Pull in the LibreSSL compatibility patches from FreeBSD
2018-05-01 08:43:36 -05:00
Armin Novak
842707b106
Fixed printf format string.
2018-04-04 10:44:51 +02:00
Armin Novak
b260937ca6
Use __attribute__((destructor)) on non windows systems.
...
atexit in shared libraries is not universally supported.
2018-04-03 14:04:22 +02:00
Armin Novak
e0d112d548
Removed all calls to WLog_Init and WLog_Uninit
...
Since the calls are no longer required remove their usage.
2018-04-03 13:06:41 +02:00
Armin Novak
d249335708
Removed winpr_exit
...
As the cleanup functions are called by atexit a dedicated
cleanup call is no longer required.
2018-04-03 12:56:33 +02:00
Armin Novak
e1b53a282f
Fix #4524 : Initialize with cleanup handler
...
Use singleton initializer and register cleanup handler for logger.
2018-04-03 10:18:59 +02:00
Armin Novak
2517755d25
Fixed thread function return and parameters.
2018-03-07 14:36:55 +01:00
Martin Fleisz
900aa94796
debug: Fix broken format specifiers
2018-03-06 16:32:36 +01:00
Armin Novak
e36d87b55c
Fix #4445 : Do not call fclose on NULL file.
2018-02-16 09:05:39 +01:00
Martin Fleisz
5d1ff02d02
Merge pull request #4414 from akallabeth/pthread_cleanup_fix
...
Pthread cleanup fix
2018-02-15 11:02:37 +01:00
Martin Fleisz
19a00f2099
Merge pull request #4325 from akallabeth/fixes_com
...
Fixes serial redirection name check and SAM file parser
2018-02-15 10:39:33 +01:00
Armin Novak
2d58e96dcc
Exit main thread with winpr_exit to trigger resource cleanup.
...
When using pthread_once with destructors they are only called,
if each thread (including the main thread) is exited with pthread_exit.
Introducing winpr_exit as a wrapper for that purpose.
2018-02-12 10:33:02 +01:00
Armin Novak
855dc9abaf
Clear message queue on free.
2018-02-09 10:29:18 +01:00
Armin Novak
9804d5a4a7
SamOpen return NULL if file was not opened.
2018-01-08 13:07:11 +01:00
Armin Novak
04708b37e1
Fixed serious issues with SAM file parser
...
The parser ommitted various checks during file parsing.
Invalid syntax did crash the whole thing.
2017-12-21 14:39:43 +01:00
Armin Novak
50a0968c6a
Removed unused variables.
2017-12-21 11:29:24 +01:00
Martin Fleisz
bfe8359b5b
Merge pull request #4239 from akallabeth/test_memleak_fixes
...
Test memleak fixes
2017-12-20 12:38:38 +01:00
Martin Fleisz
5cec90c781
Merge pull request #4305 from hardening/xrandr_fix
...
Fix XRandr for old systems and MacOSX
2017-12-13 17:24:41 +01:00
Martin Fleisz
f6b8a6eaa2
Merge pull request #4276 from akallabeth/big_endian_more
...
Big endian fixes
2017-12-13 09:58:14 +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
0a9ef97a57
Fixed uninitialized variable.
2017-12-12 10:35:02 +01:00
David Fort
41823080f9
Fix users of Stream_GetPosition() that returns size_t
2017-12-11 22:38:58 +01:00
Martin Fleisz
876a7697be
Merge pull request #4297 from akallabeth/cmd_parser_hardening
...
Fix #4296 : Hardened command line post filter.
2017-12-05 14:40:03 +01:00
Greg V
bfe3af4c72
Fix LibreSSL build
...
LibreSSL does not support FIPS mode.
2017-12-01 18:34:48 +03:00
Armin Novak
78a0c4c618
Fix #4296 : Hardened command line post filter.
2017-12-01 13:13:21 +01:00
Mike Gabriel
d4af7eaa59
fix/build: GNU/kFreeBSD is not FreeBSD
2017-11-27 17:04:52 +01:00
Armin Novak
c91900dfb3
Fixed big endian issues with bitmap read.
2017-11-24 12:03:46 +01:00
Ondrej Holy
6973b14eed
Enable FIPS mode automatically
...
FreeRDP aborts if OpenSSL operates in FIPS mode and +fipsmode is not
manually specified. Let's prevent the abortion and enable the necessary
options in that case automatically.
2017-11-23 10:09:17 +01:00
akallabeth
b156b937fe
Merge pull request #3904 from bjcollins/master
...
FIPS Mode support for xfreerdp
2017-11-17 13:31:43 +01:00
Martin Fleisz
4ff1251488
Merge pull request #4236 from akallabeth/scan_fix_remastered
...
Scanbuild warning fixes
2017-11-17 13:02:46 +01:00
Armin Novak
1bb4f121b4
Fixed formatting.
2017-11-17 12:45:28 +01:00
Brent Collins
922a0fa495
Fix checks for openssl version numbers around fips changes, they were using an incorrect version matching 1.1.0 and not 1.0.1
...
Simplify the logic to enable openssl fips mode
2017-11-17 12:43:07 +01:00
Brent Collins
5284100bb0
FIPS_mode() and FIPS_mode_set() does not exist in OpenSSL versions before 1.0.1
2017-11-17 12:43:06 +01:00
Brent Collins
d98b88642b
Add new command-line option to force xfreerdp into a fips compliant mode.
...
This option will ensure that NLA is disabled(since NTLM uses weak crypto algorithms), FIPS
encryption is enabled, and ensure fips mode is enabled for openssl.
Selectively override specific uses of MD5/RC4 with new API calls specifically tailored to override FIPS.
Add comments on why overriding the use of these algorithms under FIPS is acceptable for the locations where overrides happen.
Remove check of server proprietary certificate which was already being ignore to avoid use of MD5.
Initialize winpr openssl earlier to ensure fips mode is set before starting using any crypto algorithms.
2017-11-17 12:43:06 +01:00
David Fort
0d92c725c6
Merge pull request #4000 from akallabeth/ign_keyword_fix
...
Command line ignore empty if flag set
2017-11-16 13:26:01 +01:00
Armin Novak
f24158fe07
Fixed missing function return check.
2017-11-15 15:56:24 +01:00
Armin Novak
0aa5a83536
Fixed multiple warnings in parser
2017-11-15 15:56:21 +01:00
Armin Novak
26d079e53b
Fixed compile warnings.
2017-11-15 15:54:38 +01:00
Armin Novak
4eb5b8e349
Replaced atoi
2017-11-15 15:52:16 +01:00
Armin Novak
8c2bd951ae
Allow printing of custom arguments in help.
2017-11-15 15:25:34 +01:00
Armin Novak
bcfa434da2
Fixed resizing of PubSub
2017-09-25 13:33:04 +02:00
Bernhard Miklautz
52fbfb7b12
fix clang warnings, directly include wtypes.h ( #4097 )
...
* build: clang use -Wno-unused-command-line-argument
With clang 5.0 builds are quite noisy otherwise.
* Directly include wtypes.h
Directly include winpr/wtypes.h where _fseeki64 or _ftelli64 is used.
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: parentheses-equality
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: tautological-compare
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning:
incompatible pointer types passing 'size_t *' (aka 'unsigned
long *') to parameter of type 'UINT32 *' (aka 'unsigned int *')
[-Wincompatible-pointer-types]
2017-08-29 09:09:38 +02:00
Armin Novak
c3d4b7d262
fseeko and ftello for 64bit file support.
2017-08-14 08:42:49 +02:00
Valery Kartel
9bf9ff9e8a
Fix build with LibreSSL
2017-07-26 17:12:14 +03:00
Armin Novak
0490aeb018
Fixed clang malloc integer overflow warnings.
2017-07-20 09:29:48 +02:00
Armin Novak
33a153c07d
Command line ignore empty if flag set
...
When CommandLineParseArgumentsA is called with flag
COMMAND_LINE_IGN_UNKNOWN_KEYWORD return success if the
command line is empty.
2017-06-12 12:23:10 +02:00
Armin Novak
4be62f7047
Fixed OpenSSL 1.1 no legacy compile issues.
2017-04-06 11:25:25 +02:00
Armin Novak
09d43a66f4
Fixed tests and dead store warnings.
2017-03-28 16:49:56 +02:00
Aric Belsito
70ab61c8e6
Support LibreSSL
...
Broken by the addition of OpenSSL 1.1.0 support.
2017-03-19 13:58:24 -07:00
Armin Novak
3b56cd652f
Fix format string is not a string literal
2017-03-14 10:56:00 +01:00
Alexander Zakharov
3f139108ff
Fix Stack_Peek
2017-03-13 15:45:27 +03:00