Martin Fleisz
bc39b32d20
Merge pull request #5685 from akallabeth/multi_instance_arg_parse
...
COMMAND_LINE_ARGUMENT structs contain parser results, use one per instance
2019-11-06 09:09:22 +01:00
Martin Fleisz
5b6663fe3a
Merge pull request #5689 from akallabeth/cleanups
...
Cleanups
2019-11-05 15:28:02 +01:00
Armin Novak
b15e967c92
Use BOOL return for IniFile_Open_File and IniFile_Load_File
2019-11-05 10:31:09 +01:00
Armin Novak
66ad508b45
Removed strlen use in wlog (and speed up check)
2019-10-29 12:58:06 +01:00
Armin Novak
f01e042211
Code cleanups (strlen, casts, size_t, ...)
2019-10-29 11:58:43 +01:00
Armin Novak
700470876b
Cleaned up ini.h and added error checks.
2019-10-29 11:54:55 +01:00
Armin Novak
0c87eaee4d
COMMAND_LINE_ARGUMENT structs contain parser results, use one per instance
...
Remove the old global structs as the parser modifies them. When using
multiple instances in the same process space this could break parsing.
2019-10-28 13:30:05 +01:00
Armin Novak
2813d6860c
Added MessageQueue_Dispatch argument checks
2019-10-25 13:25:12 +02:00
kubistika
b3f78d2f4d
winpr: utils: image: fix const correctness
2019-10-24 12:19:31 +02:00
Armin Novak
9fee4ae076
Fixed #5645 : realloc return handling
2019-10-04 16:19:23 +02:00
Martin Fleisz
7edd2d8070
wlog: Fix uninitialized type in wLogMessage
2019-10-01 14:34:17 +02:00
akallabeth
3edadef768
Fix #5593 : Do not use diagnostics pragma inside functions
2019-09-22 16:37:52 +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
d7ca2db62e
Fixed doulbe semicolon in C files.
2019-05-08 12:58:01 +02:00
Bernhard Miklautz
f867c90e4c
Merge pull request #5308 from akallabeth/fix_win32_overlinking
...
Fixed windows overlinking.
2019-05-03 12:01:51 +02:00
Kubistika
967f2aefac
Fix segfault when IniFile_Load is called with invalid input ( #5331 )
...
* Fix segfault when IniFile_Load is called with invalid input
* Fix leak in TestIni.c third testcase
* TestIni.c: Refactor in order to avoid some old compilers errors
2019-04-08 09:26:46 +02:00
Armin Novak
f33e494884
Disabled -Wimplicit-fallthrough for instances where its use is intended.
2019-04-05 09:14:35 +02:00
Armin Novak
c7b7d527f3
Fixed unused argument warnings for tests.
2019-04-05 09:14:35 +02:00
Armin Novak
29741ca849
Fixed sign-compare warnings
2019-04-05 09:14:34 +02:00
David Fort
37358e81d0
Merge pull request #5285 from akallabeth/urbdrc_preparations
...
Channel, log debug and semaphore related fixes
2019-04-04 18:21:47 +02:00
David Fort
058ae0db57
Merge pull request #5273 from akallabeth/mac_compile_warning_fix
...
Fixed mac compilation warnings.
2019-04-04 18:03:50 +02:00
David Fort
c5156443e7
Merge pull request #5281 from akallabeth/assistance_ssl_init_fix
...
Fixed #5276 : Enable SSL before parsing assistance file.
2019-03-28 19:04:25 +01:00
Armin Novak
8e0565b2bd
Fixed windows overlinking.
2019-03-18 15:10:21 +01:00
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
Armin Novak
b574e196d9
Fixed WLog_PrintMessagePrefixVA
...
WLog_PrintMessagePrefixVA is called with format being a stack variable.
Always copy the data to message->PrefixString otherwise the information
will be lost whenever the stack is destroyed.
2017-03-03 14:11:28 +01:00
Armin Novak
99c45405cb
Fixed GetEnvironmentVariable.
2017-03-03 12:43:00 +01:00
Armin Novak
b2c29158be
Scanbuild warning, argument checks and leak fixes.
...
* Added Stream_GetRemainingCapacity to check remaining stream size
before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Armin Novak
e9b5d78673
Fixed scanbuild warnings.
2017-02-20 14:28:33 +01:00
Armin Novak
c249705085
Fixed scanbuild warnings.
2017-02-20 13:45:19 +01:00
Armin Novak
198bc6d9e1
Fixed compiler warnings.
2017-02-16 13:17:49 +01:00
pony
a57adc3fde
libwinpr-utils: fix 3 logic errors
2017-02-15 10:08:53 +01:00
Ilya Shipitsin
102913e808
make cppcheck a bit happier:
...
[channels/printer/client/printer_cups.c:103]: (error) Resource leak: fp
[server/Mac/mf_event.c:195]: (error) Memory leak: event_queue
[server/shadow/shadow_capture.c:233]: (error) Memory leak: capture
[winpr/libwinpr/sspi/test/TestSchannel.c:440]: (error) Memory leak: lpTokenIn
[winpr/libwinpr/thread/argv.c:198]: (error) Memory leak: lpEscapedChars
[winpr/libwinpr/utils/sam.c:312]: (error) Memory leak: entry
2017-01-25 17:09:25 +05:00
Norbert Federa
71ce3378da
Merge pull request #3665 from realjiangms/fix_ssl_add_all_digests
...
Winpr/openssl: Fix digests initialization in multi-thread
2017-01-13 09:46:14 +01:00
Martin Fleisz
ac090520c3
Fix compilation with OpenSSL 1.1.0 using MSVC
2017-01-09 16:43:28 +01:00
zihao.jiang
a505a6cd27
Winpr/openssl: Fix digests initialization in multi-thread
...
SSL functions like OpenSSL_add_all_digests should be invoked at very beginning as they are not MT safe.
If not we might meet double free exception as following:
#0 0x00007f23ddd71c37 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f23ddd75028 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f23dddae2a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007f23dddba55e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007f23dc6ecfcd in CRYPTO_free () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#5 0x00007f23dc6ef8d1 in OBJ_NAME_add () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#6 0x00007f23dc77dcd8 in EVP_add_digest () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#7 0x00007f23dc782321 in OpenSSL_add_all_digests () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#8 0x00007f23c781da28 in winpr_openssl_get_evp_md (md=4) at /home/zihao/workspace/zihao_FreeRDP/winpr/libwinpr/crypto/hash.c:52
#9 0x00007f23c781dccb in winpr_Digest_Init (ctx=0x7f22d064d470, md=<optimized out>) at /home/zihao/workspace/zihao_FreeRDP/winpr/libwinpr/crypto/hash.c:344
#10 0x00007f23d486139b in security_salted_mac_signature (rdp=0x7f23859f5a20, data=0x7f238542d4fb "\004\204\022\004", length=4743, encryption=<optimized out>, output=0x7
at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/security.c:378
#11 0x00007f23d488d73f in fastpath_send_update_pdu (fastpath=<optimized out>, updateCode=4 '\004', s=0x7f23859f5f40, skipCompression=true)
at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/fastpath.c:1076
#12 0x00007f23d4891c4f in update_send_surface_frame_bits (context=0x7f23859f5540, cmd=0x7f22b2ffcc80, first=true, last=true, frameId=6)
at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/update.c:1041
Related reports: https://rt.openssl.org/Ticket/Display.html?id=2216&user=guest&pass=guest
2016-12-28 03:48:40 +08:00
Norbert Federa
f71b6b46e8
fix string format specifiers
...
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak
8a80a10bc3
Fixed format specifier mismatch.
2016-12-02 12:04:53 +01:00
Norbert Federa
c6e6b44143
countless WLog/printf format specifier fixes
2016-11-25 17:06:25 +01:00
Norbert Federa
b2ad9803b7
disable ERR_remove_thread_state if not required
2016-11-25 10:39:20 +01:00
Norbert Federa
53bd98883e
winpr/crypt api changes and memory leak fixes
...
- winpr_HMAC_New() now just returnes the opaque WINPR_HMAC_CTX* pointer
which has to be passed to winpr_HMAC_Init() for (re)initialization
and since winpr_HMAC_Final() no more frees the context you always have to
use the new function winpr_HMAC_Free() once winpr_HMAC_New() has succeded
- winpr_Digest_New() now just returns the opaque WINPR_DIGEST_CTX* pointer
which has to be passed to winpr_Digest_Init() for (re)initialization
and since winpr_Digest_Final() no more frees the context you always have to
use the new function winpr_Digest_Free() once winpr_Digest_New() has succeded
2016-11-24 18:27:29 +01:00
Norbert Federa
7befab856c
Support for OpenSSL 1.1.0
2016-11-24 17:50:09 +01:00
Armin Novak
943e295714
WLog using C99 compatible variadic macros.
2016-10-07 14:05:27 +02:00
Armin Novak
44b8756617
Warning fixes.
2016-10-06 13:43:10 +02:00
Armin Novak
a3fd9bf5af
Fixed warnings.
2016-10-06 13:43:10 +02:00
Martin Fleisz
71765b72e3
Merge pull request #3284 from ondrejholy/endianness
...
Endianness fixes
2016-08-25 08:17:52 +02:00
Marc-André Moreau
801dc0f826
freerdp: add configurable NTLM SAM file option for server-side NLA
2016-07-21 18:58:24 -04:00
Armin Novak
d96fbd1bce
Initialise WLog PrefixString for each message type.
2016-07-05 13:00:54 +02:00
Norbert Federa
62d73dcb75
winpr: fix PathMakePathA and TestWLog
...
PathMakePathA:
- This function had an endless loop if no native delimiter was in the string
- Use SHCreateDirectoryExA on Windows
- Replaced old code with a new implementation
TestWLog:
- Windows has no "/tmp" by default
- Use GetKnownPath(KNOWN_PATH_TEMP) for the WLog "outputfilepath"
2016-06-13 19:19:28 +02:00
Ondrej Holy
44ce6b02ed
winpr/stream: Make TestStream endian-independent
...
The TestStream_PeekAndRead expects LE byte order and consequently
fails on BE. Change the test to be endian-independent.
2016-05-31 16:04:16 +02:00
Norbert Federa
e8c4910e2e
fix segfaults casused by size_t format specifier
...
win32/msvc cc does not recognize the %z format specifier which caused
invalid references and segfaults on win32.
Until FreeRDP gets format specifier macros we'll cast size_t to
unsigned long and use the %lu specifier.
Also simplified winpr_backtrace_symbols() a little bit and fixed it
to allocate the correct amount of bytes for the return buffer.
2016-05-27 15:55:28 +02:00
Armin Novak
eacf2b542e
Fixed memory leaks.
2016-05-12 10:01:30 +02: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
8fcc2aabf1
Merge branch 'master' of github.com:awakecoding/FreeRDP
2016-03-30 10:47:01 -04:00
Marc-André Moreau
9211f44e46
Merge branch 'master' of github.com:FreeRDP/FreeRDP
2016-03-15 20:19:15 -04:00
Hardening
19494bd75a
Make systemd appender honor layout and log off
2016-03-10 23:41:12 +01:00
Marc-André Moreau
c78a142388
Merge branch 'master' of github.com:awakecoding/FreeRDP
2016-03-07 21:21:17 -05:00
Marc-André Moreau
d61c2d4535
winpr: fix ini utils leak
2016-03-07 21:21:06 -05:00
Marc-André Moreau
ceefc4b099
Merge branch 'master' of github.com:FreeRDP/FreeRDP
2016-03-07 10:19:50 -05:00
Armin Novak
ee2839fc7f
Caching log filter after first use.
...
Reduce runtime penalty for log level checks by
remembering the log level found during first call.
2016-03-03 12:43:39 +01:00
Armin Novak
0ea7aea6d9
Remember filter log level.
2016-03-02 19:07:32 +01:00
Armin Novak
41fdac2667
Respecting filter in WLog_GetLogLevel
2016-03-02 14:11:15 +01:00
Bernhard Miklautz
e02af8287e
Merge pull request #3160 from akallabeth/stream_fixes
...
Stream fixes
2016-03-01 16:44:19 +01:00
Armin Novak
a79072a87c
Added tests for remaining stream functions.
2016-03-01 12:58:09 +01:00
Armin Novak
1036f1e296
Fixed default visibility.
...
When nothing is declared, only export symbols defined
with WINPR_API or FREERDP_API defined.
Override this setting if BUILD_TESTING to allow tests
access to internal functions usually not exposed.
2016-02-26 19:44:14 +01:00
Armin Novak
f997421098
Unified hmac functions.
2016-02-24 21:50:08 +01:00
Marc-André Moreau
0547a31832
winpr: fix ini loader on Windows
2016-02-10 10:51:33 -05:00
Marc-André Moreau
d0f413db12
winpr: initial port to Universal Windows Platform (UWP)
2016-02-05 16:28:45 -05:00
Marc-André Moreau
bfca674f2d
Merge branch 'master' of github.com:FreeRDP/FreeRDP
2016-02-05 11:39:45 -05:00
Martin Fleisz
56a0c4c336
Merge pull request #3097 from akallabeth/android_api_upgrade_v4
...
Android api upgrade and restructuring
2016-02-04 16:20:59 +01:00
Armin Novak
f835744a88
Removed unused variable.
2016-02-03 12:45:49 +01:00
Armin Novak
d1c59f7574
Fixed invalid boolean check.
2016-02-03 11:23:41 +01:00
Armin Novak
61633a1c66
Fixed android build issues.
2016-02-01 15:21:07 +01:00
MartinHaimberger
83b706c4be
Merge pull request #3092 from akallabeth/get_build_config
...
Added get_build_config functions.
2016-01-28 15:23:24 +01:00
Armin Novak
035f127081
Added get_build_config functions.
2016-01-28 14:26:50 +01:00
Armin Novak
c2515340c3
Fixed return value of WLog_FileAppender_WriteImageMessage
2016-01-28 12:08:57 +01:00
Martin Fleisz
7294a7f27d
Merge pull request #3078 from akallabeth/wlog_cmd_options
...
Added new command line options for logger.
2016-01-28 10:33:17 +01:00
David PHAM-VAN
3d22cbe2b8
Fix png image loading that needed write access
2016-01-27 11:02:16 -08:00
Armin Novak
06adbc971a
Fixed realloc check, renamed filter variable.
2016-01-27 11:21:04 +01:00
Armin Novak
46a079fcb6
Added new command line options for logger.
...
The new command line options /log-level:<level> and
/log-filters:<filter>:<level> allow setting default log
level and log module filter to be set.
2016-01-23 15:16:13 +01:00
Armin Novak
d2ab27626a
Fix memory leak in lodepng_zlib_compress
2016-01-15 10:16:08 +01:00
Bernhard Miklautz
7c03db342c
add parameter buildconfig
...
Extend winpr and client/common to support a new option "/buildconfig".
When used build the following build specific information is print:
* cmake options
* cflags
* compiler
* target architecture
* cmake build type
2016-01-12 17:32:33 +01:00
Armin Novak
03a1ff814d
Fixed unused warnings.
2015-12-16 15:15:46 +01:00
Armin Novak
d0e3528c8e
Added winpr_strerror function.
2015-12-09 18:27:37 +01:00
Xiaodong Qi
602d2715a2
Fix compilation error under Visual Studio 2010
...
Visual Studio 2010 use a compiler that supports only C89, which
only supports declaring variable at top of a local scope. Moving
scope variable to the top of function should solve this problem.
2015-11-29 00:14:29 +08:00
Marc-André Moreau
2f5d159448
winpr: fix WinXP backwards compatibility
2015-11-25 13:46:10 -05:00
Bernhard Miklautz
bff63b3ee2
wlog: cleanup API includes
...
Only include necessary header files.
2015-11-10 16:29:09 +01:00
Bernhard Miklautz
be0845b46c
wlog/journald: don't set a default identifier
...
Don't set the identifier to "winpr" as default value because journald
will use the programs name as default if no identifier is set.
This way a program using WLog doesn't need to set an identifier (except
it want something different then it's name).
2015-11-10 13:40:52 +01:00
Bernhard Miklautz
34c707304b
wlog: change variable naming and fix documentation
...
* change State to active and make it BOOL since it's only got two
used values
* fix some typos in the documentation
2015-11-10 12:05:23 +01:00
Bernhard Miklautz
25137988fe
wlog: fix build on windows
2015-11-09 19:47:51 +01:00
Bernhard Miklautz
57f952bbbc
wlog: fix android build
2015-11-09 19:37:02 +01:00
Bernhard Miklautz
67368b2ec7
Adapt error level for debug messages
...
When using xfreerdp a regular invocation should really only report grave
problems as error. "Regular" messages should be either info or even
debug.
2015-11-09 18:27:38 +01:00
Bernhard Miklautz
07417599ce
wlog: rework, cleanup and stabilize API
...
* only expose necessary functions and types in header
* don't expose appender internals
* add generic function WLog_ConfigureAppender to have the possibility
to configure appender specific settings
* detect appender availability if WLog_SetLogAppenderType or
WLog_Appender_New return FALSE or NULL respectively the appender isn't
available or the initialization failed. This is very useful for the
use with optional appenders.
* add Free to the appender interface. At the time of the Free the
appender is known and available so it can be called directly (instead
of calling the right function according to the type)
* make all appender internal function static
* all appenders return the generic wLogAppender type now. Typecasts
are internally done where necessary this abstracts the appenders more
cleanly
2015-11-09 18:25:45 +01:00
David FORT
458aaa1213
Take in account @nfedera's remarks
2015-11-06 23:17:11 +01:00
David FORT
5fbf26acf2
Add an UDP appender to wLog
...
This appender allows to receive the logs over a network connection using UDP packets.
You can see the logs using a listening netcat, for example: nc -ul 127.0.0.1 20000.
2015-11-04 18:11:19 +01:00
Hardening
3d6e1fb418
Merge pull request #2951 from bmiklautz/friday
...
Misc fixes
2015-11-02 10:50:16 +01:00
David FORT
2a8de84342
Take in account @bmiklautz remarks
...
* I have added a function to set the journal identifier
* the appender name has been changed from SYSTEMD to JOURNALD
2015-11-01 21:34:03 +01:00
David FORT
e3915b66b7
Fix the env var leak
2015-10-30 20:22:25 +01:00
David FORT
89156e53b7
Use unbuffered output
2015-10-30 20:20:42 +01:00
David FORT
9ea301983d
Adds a systemd journal appender
2015-10-30 14:50:14 +01:00
Bernhard Miklautz
a011719831
Merge pull request #2940 from hardening/syslog_appender
...
Add a wLog syslog appender
2015-10-29 18:44:14 +01:00
David FORT
8d2aadfccd
Fixed a warning
2015-10-29 18:33:42 +01:00
David FORT
c2a322f4d0
Support syslog type for the WLOG_APPENDER env var
2015-10-29 18:31:22 +01:00
Bernhard Miklautz
ab05a79c21
winpr/stream: don't allow 0-size streams
2015-10-23 18:38:41 +02:00
Bernhard Miklautz
a9d81ad083
winpr: fix compiler warning
...
winpr/libwinpr/utils/wlog/wlog.c: In function ‘WLog_PrintMessageVA’:
winpr/libwinpr/utils/wlog/wlog.c:234:7: warning: ‘status’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
BOOL status;
^
gcc 4.9.2
2015-10-23 18:37:39 +02:00
Martin Fleisz
08cbcb3577
wlog: Fix variable definitions
2015-10-23 12:08:20 +02:00
David FORT
d9080312bc
Adapt to last wLog changes
2015-10-22 10:54:21 +02:00
David FORT
720c879661
Add a wLog syslog appender
2015-10-22 10:37:49 +02:00
Martin Haimberger
b2398b3a9a
wlog: fixed return values
...
wlog used to return an int but the only meaning
of the return value was:
* negative ... error
* 0 or positive ... success
but the positve returned value was 1 or some id of some
subsystem, nothing meaningful for the caller.
For a more meaningful returnvalue we now use BOOL.
If something goes wrong FALSE is returned.
2015-10-21 01:11:06 -07:00
Marc-André Moreau
87780a850d
Merge branch 'master' of github.com:FreeRDP/FreeRDP into mbedtls
2015-10-09 15:58:50 -04:00
Marc-André Moreau
4f769866d7
winpr: make clean non-OpenSSL build possible (without schannel, makecert)
2015-10-09 15:57:41 -04:00
Marc-André Moreau
94a2f9533e
winpr: start porting to non-OpenSSL
2015-10-05 16:23:44 -04: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
Bryan Everly
bd149a284d
Cleaned up previous OpenBSD change per recommendation
2015-09-14 13:20:11 -04:00
Armin Novak
2c7a20d8c0
Fixed uninitialized memory.
2015-09-01 12:25:43 +02:00
Armin Novak
cb7927756d
Fixed resource leak.
2015-09-01 11:31:12 +02:00
Armin Novak
5cad081cc8
Fixed memory leak.
2015-08-28 11:07:25 +02: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
cf9f975341
Replaced snprintf with sprintf_s
2015-07-03 13:26:15 +02:00
Armin Novak
7dc96c412f
Added convenience function winpr_log_backtrace.
2015-07-03 09:22:02 +02:00
Armin Novak
78eeb861d5
Fixed mixed declarations and code.
2015-07-01 16:20:56 +02:00
Bernhard Miklautz
1cee185e3c
hardening: check fread and fwrite return values
2015-06-26 20:38:30 +02:00
Armin Novak
6ed7b7b4b3
Fixed a resource leak.
2015-06-24 09:29:52 +02:00
Armin Novak
f177430acc
Fixed a resource leak.
2015-06-24 09:29:13 +02:00
Armin Novak
6698e24228
Fixed leaks, NULL dereferences and broken init.
2015-06-23 21:29:21 +02:00
Bernhard Miklautz
06502e6a91
misc: integrate pull request feedback
2015-06-22 19:24:30 +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
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
Armin Novak
7403cdc60c
Added PathMakePath function.
2015-06-09 13:16:28 +02:00
Armin Novak
c6c43d5f06
Writing failure to stderr.
2015-06-02 17:54:27 +02:00
Armin Novak
1c3b38f58b
Fixed image test.
2015-06-02 17:53:16 +02:00
Armin Novak
2a3cd74c02
Fixed image test.
2015-06-02 15:17:54 +02:00
David FORT
12f873f1f9
Fixed MessageQueue and callers
2015-05-29 14:24:14 +02:00
Martin Haimberger
951a2d2210
stream: check stream_new in winpr and libfreerdp
...
also fixed a few things
2015-05-29 04:46:50 -07:00
Marc-André Moreau
5526348079
Merge branch 'master' of github.com:FreeRDP/FreeRDP
2015-05-21 13:29:59 -04:00
Marc-André Moreau
c64be497b8
libwinpr-utils: update backtrace utils
2015-05-21 13:25:35 -04:00
Marc-André Moreau
7e1dbd505b
Merge branch 'awakecoding' of https://github.com/vworkspace/FreeRDP
...
Conflicts:
channels/rdpdr/server/rdpdr_main.c
2015-05-20 11:40:48 -04:00
Marc-André Moreau
29d14773c8
Merge branch 'master' of github.com:FreeRDP/FreeRDP
...
Conflicts:
client/Windows/wf_client.c
libfreerdp/common/assistance.c
2015-05-20 10:12:24 -04: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
Bernhard Miklautz
d4df3a952b
Merge pull request #2594 from baruchsiach/fix-math-2
...
Don't disable C99 long double math on non Unix platforms
2015-05-08 13:44:26 +02:00
Bernhard Miklautz
81568ff03a
Merge pull request #2596 from akallabeth/wlog_default_out_fix
...
Wlog console output to stderr
2015-05-08 00:49:41 +02:00
Marc-André Moreau
87bb3aa6e0
wfreerdp: fix build
2015-05-07 13:35:39 -04:00
Norbert Federa
f9f59cd29b
Fix unchecked CreateDirectory calls
2015-05-07 13:28:13 +02:00
Norbert Federa
c77def3048
Fix unchecked CreateMutex calls
2015-05-07 13:27:49 +02:00
Armin Novak
1d3e847f12
Fixed broken indent.
2015-05-06 15:37:55 +02:00
Armin Novak
c0fbaa579b
Not writing messages if level is WLOG_OFF.
2015-05-06 10:58:57 +02:00
Armin Novak
c375071b5d
Console logging to stdout and stderr
...
With this patch the default for the console logger
changes to writing to stdout for TRACE, DEBUG and INFO
messages and stderr for WARNING, ERROR and FATAL messages.
2015-05-06 10:56:30 +02:00
Martin Fleisz
063c1bc806
Merge pull request #2592 from nfedera/fix-2015-05-05-01
...
Fix unchecked CreateThread calls and misc fixes
2015-05-06 10:16:26 +02:00