akallabeth
240fdd07b1
Replaced localtime with localtime_r
2020-06-22 11:51:38 +02:00
akallabeth
057b6df4ae
Fixed memory leaks in ntlm
2020-06-22 11:51:38 +02:00
Armin Novak
8e45a2dd50
Respect SECBUFFER_READONLY flag in NTLM EncryptMessage
2020-06-19 11:31:13 +02:00
Bernhard Miklautz
529e30c273
Revert "winpr/library: Use RTLD_GLOBAL for dlopen"
...
Using RTLD_GLOBAL in LoadLibraryA introduces a different behavior than
expected.
This reverts commit d566e00258
.
2020-06-17 12:59:41 +02:00
Patrick Chin
8515846317
MessageQueue write time to current message not the next
2020-06-09 08:51:53 +02:00
Kobi Mizrachi
920acd4c0e
winpr: image: add API to construct bmp header
2020-06-05 09:22:26 +02:00
Ondrej Holy
d566e00258
winpr/library: Use RTLD_GLOBAL for dlopen
...
LoadLibraryA implementation uses the RTLD_LOCAL flag for dlopen currently.
This flag doesn't allow the symbols to be used by the subsequently loaded
libraries. This is a problem for the video channel when -DBUILTIN_CHANNELS=OFF
is used as it uses functions from the geometry channel. Let's use RTLD_GLOBAL
instead to prevent "undefined symbol" errors in such cases.
Fixes: https://github.com/FreeRDP/FreeRDP/issues/6236
2020-05-27 13:06:12 +02:00
akallabeth
58ef235bc5
Removed unused variable warnings
2020-05-20 15:10:07 +02:00
akallabeth
aea795eecf
Fixed invalid argument to strtok_s
2020-05-20 15:10:07 +02:00
akallabeth
45860a5561
Fixed issues with clang sanitizers and alignemt offsets.
2020-05-20 15:10:07 +02:00
akallabeth
7540384db1
utf8 behaviour fixes
2020-05-20 15:10:07 +02:00
akallabeth
401bb836fb
Fixed memory leak in NTLM test
2020-05-20 15:10:07 +02:00
akallabeth
b9149df1e6
Fixed BehaviourSanitizer warnings in streams.
2020-05-20 15:10:07 +02:00
akallabeth
1baf67d881
Fixed memory leak in ini parser and test functions.
2020-05-20 15:10:07 +02:00
akallabeth
a887c890f2
Fixed BehaviorSanitizer warnings.
2020-05-20 15:10:07 +02:00
akallabeth
0502bfcfbc
Fixed BehaviorSanitizer warnings
2020-05-20 15:10:07 +02:00
akallabeth
535ef57e2e
Fixed BehaviorSantizer warnings.
2020-05-20 15:10:07 +02:00
akallabeth
b37d8c9be1
Fixed GHSL-2020-100: oob read in ntlm_read_ChallengeMessage
...
* Added length checks for data read from stream
* Unified function resource cleanup
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
ddb388e152
Refactored sam functions to utilize strtok_s
2020-05-18 12:07:59 +02:00
akallabeth
7890833af8
Replaced strtok with strtok_s
2020-05-18 11:39:22 +02:00
Kobi Mizrachi
fddda159d9
change use of strtok to strtok_s
2020-05-18 11:08:20 +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
Kentaro Hayashi
148f3c675d
Fixed typos (Otherweise)
...
Otherweise ->
Otherw ise
^
2020-05-10 16:35:20 +09:00
akallabeth
bc0a2c277d
Silence valgrind in unicode conversion functions
...
Only check destination buffer for NULL if length argument did not
already indicate the buffer needs to be allocated.
2020-05-08 11:04:03 +02:00
akallabeth
dffd893dc5
Fixed integer overflow in winpr_image_bitmap_read_buffer
...
Thanks to hac425
2020-05-08 11:04:03 +02:00
akallabeth
8241ab42fd
Fixed oob read in ntlm_read_AuthenticateMessage
2020-05-06 13:31:57 +02:00
akallabeth
afdffac4b5
Fixed oob read in ntlm_read_ntlm_v2_response
2020-05-06 13:31:57 +02:00
akallabeth
8fa3835963
Fixed oob read in ntlm_read_NegotiateMessage
2020-05-06 13:31:57 +02:00
qarmin
ceec2cf1a0
Fixed copy paste error in MessagePipe.c
2020-05-01 19:42:46 +02:00
Zhu Qun-Ying
5553be0983
possible memory leak when various functions return failure. ( #6110 )
...
* possible memory leak when allocation failed.
* Use initialization in stead of ZeroMemory
* Format with clang-format
2020-04-25 16:07:12 +02:00
Zhu Qun-Ying
a1e421c93d
use WINPR_MD5_DIGEST_LENGTH in stead of magic number for hash array
2020-04-24 08:33:30 +02:00
Zhu Qun-Ying
8cc9b09ba1
Use NTOWFv2FromHashW() in NTOWFv2W() to avoid duplicate code
2020-04-24 08:33:30 +02:00
Alex Wilson
40f23e2728
SCardReadCache/SCardWriteCache should actually cache data
...
Currently since the hash/keyCompare/keyClone members on the
context->cache were never being set, we were using the
HashTable_Pointer* variants, meaning that lookup always
failed (since we never ask for the same *pointer* twice).
This also revealed that the logic for autoallocate on these ops
was a bit backwards, and some error codes and support for the
"freshness" counter were missing.
In Win10 (at least with some card minidrivers) the freshness
counter is load-bearing and smartcard login won't work without
implementing a very basic version of it.
2020-04-21 08:11:54 +02:00
David Fort
7733fe7a8a
Merge pull request #6060 from akallabeth/warnings
...
Fix some compiler warnings
2020-04-16 10:54:43 +02:00
Martin Fleisz
9e1b2eb42e
Merge pull request #6081 from akallabeth/disable_spincount
...
Disable spincount
2020-04-15 13:24:26 +02:00
Martin Haimberger
7b6b9a9675
removed unnecessary casts, use sizeof for debug printing
2020-04-15 13:20:03 +02:00
Martin Haimberger
85e49aa601
fix: server side ntlmv2 implementation
...
- in the case no mic was present, but the user was found,
the enterd password was ignored and the user authenticated
2020-04-15 13:20:03 +02:00
Armin Novak
a161bafa5f
Fix #6066 , #6045 : Disable spincount by default.
2020-04-13 09:56:19 +02:00
Armin Novak
ebf44f80eb
Fixed format string warnings.
2020-04-11 09:43:01 +02:00
akallabeth
08fd2876b9
Started 3.0 development cycle.
2020-04-10 15:01:15 +02:00
Bernhard Miklautz
5ab2bed874
new: update ChangeLog and set version to 2.0.0
2020-04-09 18:00:51 +02:00
Martin Fleisz
99786970a3
Merge pull request #5884 from akallabeth/smartcard_ndr_strict
...
Smartcard tighter input validation
2020-03-31 08:34:04 +02:00
Armin Novak
ab21b1ef25
Silenced warning due to missing define guard.
2020-03-10 14:04:53 +01:00
Armin Novak
461bc825de
Removed unused function
2020-03-10 14:04:53 +01:00
Armin Novak
07cc1edaa0
Removed unused function
2020-03-10 14:04:53 +01:00
Armin Novak
106ab8cfbd
Removed unused function
2020-03-10 14:04:53 +01:00
Armin Novak
d29448bda8
Removed unused function
2020-03-10 14:04:53 +01:00
Armin Novak
7416b9b604
Using bsearch to get ntstatus string.
2020-03-10 14:04:53 +01:00
Armin Novak
e63377945b
Silenced warning due to missing debug define guard.
2020-03-10 14:04:53 +01:00
Armin Novak
94f0dc127b
Removed unused functions / files
2020-03-10 14:04:53 +01:00
Armin Novak
8afa27c936
Fixed broken NULL check.
2020-03-10 08:59:52 +01:00
Armin Novak
8b85913ac0
Added winpr_md_type_from_string and winpr_md_type_to_string
2020-03-06 11:37:35 +01:00
Armin Novak
9d13729617
Added sha3 hashes for openssl.
2020-03-06 11:37:35 +01:00
Armin Novak
e3acc01bfb
Added missing WINPR_*_DIGEST_LENGTH definitions.
2020-03-06 11:37:35 +01:00
Armin Novak
1fd51d9183
Fixed clang scanbuild warnings.
2020-03-04 09:17:35 +01:00
Armin Novak
aa441d3238
Log smartcard to stdout.
2020-02-20 15:24:03 +01:00
Armin Novak
959be9d946
Fixed warnings in pcsc layer
2020-02-20 14:03:29 +01:00
Armin Novak
fa10dfa186
Fixed memory leaks in PCSC_SCardReadCache[AW]
2020-02-20 13:59:28 +01:00
Armin Novak
f885476423
Fixed 8bit and 16bit return string sizes.
2020-02-20 13:59:28 +01:00
Armin Novak
ef93109f42
Fixes for GetAttrib and some refactroing
...
* Fix accidental buffer free before transfer
* Refactored code to eliminate a bunch of warnings
* Updated copyright headers
2020-02-20 13:59:28 +01:00
Armin Novak
f0f476c7d5
Fixed pcsc function pointer casts.
2020-02-20 13:59:28 +01:00
Armin Novak
2acce6214c
SCardFreeMemory non const argument.
2020-02-20 13:59:28 +01:00
Armin Novak
37e850cb24
Cleaned up smartcard pcsc wrapper.
2020-02-20 13:59:28 +01:00
Armin Novak
30983f4049
Cleaned up smartcard inspect.
2020-02-20 13:59:28 +01:00
Armin Novak
e9a75d5a7a
Updated timezones 2020-02-19
2020-02-19 15:27:10 +01:00
Armin Novak
75be471d78
Fixed #5889 : Only add descriptors wanted to select
2020-02-18 14:33:45 +01:00
Martin Fleisz
e304428a5f
Merge pull request #5857 from akallabeth/scanbuild_fixes
...
Scanbuild fixes
2020-02-12 10:16:54 +01:00
David Fort
245fc6014d
Merge pull request #5830 from akallabeth/smartcard_updates
...
Smartcard updates
2020-02-07 14:11:00 +01:00
Armin Novak
2b8bc8ea5e
Fixed unused argument warnings.
2020-01-23 10:12:12 +01:00
Kobi Mizrachi
8c5d96784d
cmdline: export CommandLineParseCommaSeparatedValues
2020-01-22 14:18:21 +01:00
Kobi Mizrachi
1543664343
winpr: collections: add ArrayList_ForEach
2020-01-14 07:58:47 +01:00
David Fort
f3ffa19039
winpr: don't close file descriptor if we set it again to the same file
2020-01-13 12:27:24 +01:00
Armin Novak
4798af5132
Fix smartcard structs, conform to [MS-RDPESC]
2020-01-13 10:49:22 +01:00
Armin Novak
a392b266c0
Added NtStatus2Tag function to stringify NTSTATUS
...
For higher level applications it is easier to translate known
strings instead of error codes. this function allows
to retrieve known string identifiers that can be translated.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 16:14:44 +01:00
Martin Fleisz
3e3458cc3c
Merge pull request #5821 from akallabeth/smartcard_log_err
...
Added debug log messages for SCARD_E_NO_SERVICE
2020-01-09 10:12:14 +01:00
Armin Novak
c98b3e0cef
Added debug log messages for SCARD_E_NO_SERVICE
...
Log where and what caused SCARD_E_NO_SERVICE return in smartcard
wrapper
2020-01-09 08:20:42 +01:00
Kobi Mizrachi
8c3054851c
winpr: thread: fix wrong log level in ThreadCloseHandle
2020-01-08 11:59:34 +01:00
David Fort
004f59083d
Merge pull request #5802 from dragonuaix/master
...
Update comm_serial_sys.c
2020-01-08 08:08:42 +01:00
Armin Novak
44ac64ffb9
Fixed duplicate definition in TestGetComputerName
2020-01-07 10:51:01 +01:00
dragonuaix
4c1d57b3d0
Update comm_serial_sys.c
2019-12-26 16:48:00 +02:00
Martin Fleisz
02e7a07832
Merge pull request #5768 from akallabeth/timezone_update
...
Timezone update
2019-12-17 14:11:40 +01:00
Kobi Mizrachi
f92e941129
winpr: SetWaitableTimer should not free the handle if it fails
2019-12-17 09:46:00 +01:00
Armin Novak
c9dd343a65
update timezones.
2019-12-06 11:05:09 +01:00
Armin Novak
1a52aff7f9
Update WindowsZones.c
2019-12-06 11:03:30 +01:00
Armin Novak
3143570f54
Added missing Stream_Write_INT32
2019-12-04 13:44:08 +01:00
Martin Fleisz
71feb974ac
Merge pull request #5739 from akallabeth/improve_function_hiding
...
Improve function hiding
2019-12-02 11:31:35 +01:00
Armin Novak
7c243da6e1
Remove symbols exported by accident.
2019-12-02 10:57:31 +01:00
David Fort
5e6775ce95
winpr: fix anonymous enum members and menbers without a size
2019-11-25 13:39:31 +01:00
Bernhard Miklautz
a378511617
Merge pull request #5743 from akallabeth/32bit_warn_fix
...
Fix #5741 : Limit strnlen checks to INT_MAX to silence compile on 32bi…
2019-11-21 15:23:19 +01:00
Armin Novak
53f7d023b1
Fixed GetEnvironmentStrings test
...
Some os return an invalid/wrong character count if a string with
unknown symbols is printed to stdout.
Instead use the sprintf family and print to a buffer / determine
the required buffer size.
2019-11-21 15:05:57 +01:00
Martin Fleisz
b176fdeff8
Merge pull request #5738 from akallabeth/hide_unexported_functions
...
Do not export functions that are purely internal.
2019-11-21 08:29:00 +01:00
Armin Novak
67dc2e0bdb
Fix #5741 : Limit strnlen checks to INT_MAX to silence compile on 32bit builds.
2019-11-21 08:09:08 +01:00
Armin Novak
708a28d8dd
Do not export functions that are purely internal.
2019-11-20 11:08:02 +01:00
Armin Novak
f34e33ed2b
Cleaned up code for makecert.
2019-11-20 08:37:53 +01:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
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
b06efc78ec
Fixed warnings from TestEnvironmentGetEnvironmentStrings
2019-10-29 12:58:06 +01:00
Armin Novak
1fb716d864
Cleaned up TestCryptoHash
2019-10-29 12:58:06 +01:00
Armin Novak
142db87970
Removed strlen from GetComputerNameExA
2019-10-29 12:58:06 +01:00
Armin Novak
68f519ed6c
Fixed length checks for GetComputerNameA
2019-10-29 12:58:06 +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
asapelkin
82eadad4a4
Fix some static analizer warnings
2019-10-22 15:39:54 +02:00
Armin Novak
9fee4ae076
Fixed #5645 : realloc return handling
2019-10-04 16:19:23 +02:00
Armin Novak
4d8b86f05c
GetEventFileDescriptor return handle internal event.
2019-10-02 14:58:32 +02:00
Martin Fleisz
583045e2e5
rail: Update to latest spec version 28.0
2019-10-02 14:51:45 +02:00
akallabeth
a3dae4ad46
Fix WINPR_EVENT and WINPR_TIMER structs.
...
Both structs must have the same base members so that the event
handle can be extracted at the same offset.
2019-10-01 21:03:03 +02:00
Martin Fleisz
a907f003e1
Merge pull request #5596 from akallabeth/wlog_cache_ptr
...
Speedup for WLog_* macros, cache the log pointer
2019-10-01 15:57:17 +02:00
Martin Fleisz
7edd2d8070
wlog: Fix uninitialized type in wLogMessage
2019-10-01 14:34:17 +02:00
Armin Novak
b1d0eaff6d
Fix #5603 : Prefer absolute path for /drive: syntax.
2019-09-24 16:42:27 +02:00
akallabeth
3edadef768
Fix #5593 : Do not use diagnostics pragma inside functions
2019-09-22 16:37:52 +02:00
Armin Novak
d46a3cb11d
Speedup for WLog_* macros, cache the log pointer
...
WLog_Get(tag) is quite expensive if called repeatedly.
With this patch the pointer is cached on first call.
2019-09-15 10:04:36 +02:00
Armin Novak
f39ec50101
Converted BitStream_* defines to inline functions
2019-09-03 08:55:59 +02:00
Armin Novak
d99486096b
Added deprecation macro.
2019-09-02 15:13:09 +02:00
Armin Novak
f93d625cde
Use GetTickCount64 instead of GetTickCountPrecise.
2019-09-02 15:46:36 +02:00
Armin Novak
da52297913
Added winpr version macro (same as freerdp version)
2019-08-22 16:03:50 +02:00
Armin Novak
92ca3002e3
Allow build without WinPR tools
2019-08-14 15:10:00 +02:00
Armin Novak
8ab5a2d6bb
Use GetSystemTimeAsFileTime to emulate GetTickCount64
2019-08-13 10:55:12 +02:00
Armin Novak
cbb9354641
Fix broken clipboard after file copy
2019-07-17 15:13:50 +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
6d553a7f3c
Fixed #5441 , thank you @ekse
2019-06-25 10:25:31 +02:00
Martin Fleisz
ccd1fc71e9
Merge pull request #5327 from akallabeth/sign_compare_fixes_v3
...
Leak and warning fixes for 2.0
2019-05-09 13:21:36 +02:00
Armin Novak
2cc714a57d
Updated RAILS implementation
...
* Implement new messages and callbacks
* Announce most recent channel features
* Added settings to configure flags to announce
2019-05-08 17:25:15 +02:00
Armin Novak
447e330bdf
Fixed uninitialized value
2019-05-08 15:13:03 +02:00
Armin Novak
e42b15eb05
Fixed memory leak
2019-05-08 15:13:03 +02:00
Armin Novak
9bee5e80ee
Fixed memory leak
2019-05-08 15:12:40 +02:00
Martin Fleisz
3e2be308eb
Merge pull request #5266 from akallabeth/file_list_synth
...
Added a proper synthesizer for FileGroupDescriptorW to text/uri-list
2019-05-08 15:05:05 +02:00
Armin Novak
84a297b830
Fixed error checks and uninitialized values in convert_filedescriptors_to_uri_list
2019-05-08 14:41:22 +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
f8dd9a9f75
Fixed ntlm_av_pair_get_len return, no signed value required
2019-04-05 09:28:09 +02:00
Armin Novak
2c9cd5067f
Fixed argument pointer type cast
2019-04-05 09:22:50 +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
a1ee97c154
Fixed GetModuleFileNameW.
2019-04-05 09:14:35 +02:00
Armin Novak
a16813d237
Fixed SleepEx return value and added log messages for unimplemented features.
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
e605a10921
Fixed NULL argument warning.
2019-04-05 09:14:35 +02:00
Armin Novak
71924958bd
Added event name to handle.
2019-04-05 09:14:35 +02:00
Armin Novak
55e9132fa4
Fixed NULL argument warning.
2019-04-05 09:14:35 +02:00
Armin Novak
1d87fdc803
Implemented GetModuleFileNameW
2019-04-05 09:14:35 +02:00
Armin Novak
b5d9b6dba4
Improved timer implementation and error messages.
2019-04-05 09:14:35 +02:00
Armin Novak
f8e5e8cd7d
Improved error logging for wait functions.
2019-04-05 09:14:35 +02:00
Armin Novak
ebb93a1273
Improved implementation of LoadLibrary functions.
2019-04-05 09:14:35 +02:00
Armin Novak
7b246121b4
Improved mutex and event functions
...
* Added name for debugging to handle.
* Implemented *Ex functions
2019-04-05 09:14:35 +02:00
Armin Novak
29741ca849
Fixed sign-compare warnings
2019-04-05 09:14:34 +02:00
Armin Novak
4c2028e285
Fixed sign-compare warnings
2019-04-05 09:14:34 +02:00
Armin Novak
6e655189c3
Fixed sign-compare warnings
2019-04-05 09:14:34 +02:00
Armin Novak
58d5c5f7d1
Fixed sign-compare warnings
2019-04-05 09:14:34 +02:00
Armin Novak
0b82768a70
Fixed sign-compare warnings
2019-04-05 09:14:34 +02:00
Armin Novak
70e37746cb
Fixed sign-compare warnings
2019-04-05 09:13:25 +02:00
Armin Novak
cfdcaa2653
Fixed sign-compare warnings
2019-04-05 09:13:25 +02:00
Armin Novak
309fe960f7
Fixed sign-compare warnings
2019-04-05 09:13:24 +02:00
Armin Novak
b5a7e4d9b9
Fixed sign-compare warnings
2019-04-05 09:13:24 +02:00
Armin Novak
279a5fe39f
Fixed sign-compare warnings
2019-04-05 09:13:24 +02:00
Armin Novak
6f3808a224
Fixed sign-compare warnings
2019-04-05 09:13:24 +02:00
Armin Novak
699d7d1462
Fixed _config_size return
2019-04-05 09:13:24 +02:00
Armin Novak
b7ac5b9bc8
Fixed sign-compare warnings
2019-04-05 09:13:24 +02:00
Armin Novak
7dfc453858
Cast SEC_* return values to HRESULT (Same as WIN32 API)
2019-04-05 09:13:24 +02:00
Armin Novak
9757d536c3
Case SCARD_* return values to HRESULT (Same as WIN32 API)
2019-04-05 09:13:24 +02:00
Armin Novak
25751517e5
Cast E_* errors to HRESULT (same as defined in WIN32 API)
2019-04-05 09:13:24 +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
a63f717871
Merge pull request #5309 from smaeul/patch/ntlm
...
Fix NTLM AvPair lists
2019-04-04 18:19:56 +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
Armin Novak
745c6b933a
Fixed \0 terimination of clipboard file list
2019-04-03 10:17:51 +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
Samuel Holland
6931f54fad
Fix NTLM AvPair lists
...
There were two main issues here: First, the `ntlm_av_pair_add` and
`ntlm_av_pair_add_copy` were not adding a new `MsvAvEOL` to the end of
the list to replace the one they overwrote. This caused the second call
to one of those functions to fail (since it couldn't find the
terminator), which was the source of the test failure. It also caused
`ntlm_av_pair_list_length` and `ntlm_print_av_pair_list` to read out of
bounds until they happened to find the right word.
Second, several bounds checks were wrong or missing. For example,
`ntlm_av_pair_add` does not ensure that the value fits inside the list.
And `ntlm_av_pair_get_len` and `ntlm_av_pair_get_value_pointer` can
return error codes or NULL, but those error returns were ignored, and
the values used anyway (such as in `ntlm_av_pair_add_copy`).
This fixes the list handling code to have the invariant that all
functions returning `NTLM_AV_PAIR*` only return non-`NULL` if the entire
returned `AvPair` is within bounds. This removes the need for the length
parameter in functions that only operate on a single `AvPair`. This
check is performed by the new `ntlm_av_pair_check` helper, which is
added in some new places and used to simplify the code in others.
Other issues fixed along the way include:
- `ntlm_av_pair_list_length` did not cast to `PBYTE`, so it was
returning the number of `NTLM_AV_PAIR`-sized chunks (which was
possibly not even an integer) instead of the number of bytes
- I removed an impossible check for `offset <= 0` in
`ntlm_av_pair_get_next_pointer`
- The assertion that `Value != NULL` and the call to `CopyMemory` are
only necessary if `AvLen` is nonzero
- `ntlm_av_pair_get_next_pointer` (renamed to `ntlm_av_pair_next`)
could be declared `static`
With this commit, TestNTLM now passes on powerpc64.
```
$ ./Testing/TestSspi TestNTLM
NTLM_NEGOTIATE (length = 40):
NTLM_CHALLENGE (length = 168):
NTLM_AUTHENTICATE (length = 352):
$ echo $?
0
```
Fixes #5250
2019-03-17 20:40:13 -05:00
Armin Novak
e5fbff357e
Fixed Stream_* macros, bracing arguments.
2019-03-07 09:29:32 +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
4e31cf929e
Fixed ReleaseSemaphore, respect lReleaseCount
...
Signal the semapore lReleaseCount times.
2019-02-26 15:33:51 +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
Armin Novak
32ea44c037
Added a proper synthesizer for FileGroupDescriptorW to text/uri-list
...
The file clipboard delegate needs a base URI to operate on for
systems that are not WIN32. Added that to the context and abort
conversion, if that is not set. (currently not fully implemented)
2019-02-21 16:44:40 +01:00
Armin Novak
32e5407b43
Ignore INVALID_HANDLE_VALUE during clang scanbuild runs.
...
The value INVALID_HANDLE_VALUE could in theory be a valid memory address,
so the analyzer is confused and thinks either we have a memroy leak
or we try to free a fixed address.
2019-02-21 12:21:51 +01:00
Armin Novak
41d382569c
Respect return value from SetEvent and abort creation.
2019-02-21 12:21:51 +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
Armin Novak
22eddef668
Fixed wide character comparison.
2019-02-08 09:20:58 +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
Bernhard Miklautz
162a69b0f0
Merge pull request #5139 from akallabeth/drive_hotplug_shutdown_crash_fix
...
Fixed crash on drive hotplug shutdown.
2019-02-07 10:08:41 +01:00
Armin Novak
3679eefbd4
Fixed BipBuffer Read/Write, limit to SSIZE_MAX.
2019-01-30 18:05:49 +01:00
Armin Novak
650f63c7ca
Added missing SSIZE_MAX define
2019-01-30 18:05:49 +01:00
Armin Novak
9c5c722aaa
Fixed use of ASCII function on WCHAR
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
2bd43398e8
Fixed sign-compare warning
2019-01-30 18:05:49 +01:00
Armin Novak
f39ec7c453
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
c00010478c
Fix FindNextFileA path termination with a single separator.
2019-01-30 15:44:45 +01:00
Armin Novak
9033df501e
Fixed compiler warnings for TRIO_CONST and limited data type.
2019-01-29 17:51:44 +01:00
Armin Novak
2e5fd8d16b
Fixed clang analyzer false positive memory leaks.
...
Added a justification for each #ifndef __clang_analyzer__
2019-01-29 17:17:30 +01:00
akallabeth
0a8ebcfcac
Merge pull request #5187 from astrand/mingw-part1
...
Mingw build fixes part1
2019-01-29 10:46:21 +01:00
David Fort
ad75ae512c
Merge pull request #5200 from akallabeth/os2_fixes
...
Os2 fixes
2019-01-18 18:04:23 +01:00
Armin Novak
4f1462b73b
Added fix for OS2 paths.
...
Reported on mailing list by Andrey Vasilkin
2019-01-18 13:13:41 +01:00
Armin Novak
b08505cbe0
Fixed return check in SwitchToThread
...
Patch on mailing list by Andrey Vasilkin
2019-01-18 13:02:30 +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
Bernhard Miklautz
3498e76948
fix [winpr/hash]: initialize ssl
...
winpr-crypt is used in winpr for hash generation but currently it's
still required to initialize openssl in the application itself.
winpr-hash didn't do that therefore the generated hashes were useless.
2019-01-16 12:05:47 +01:00
Peter Åstrand (astrand)
a7f4b90f36
Pointer arithmetics require lvalue
...
(type *)x evaluates to a temporary. Fixed build with GCC.
2019-01-09 11:13:38 +01:00
Peter Åstrand (astrand)
32ba90ec0a
Avoid building POSIX clipboard if WIN32
...
MinGW has unistd.h.
2019-01-09 10:04:38 +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
Martin Fleisz
5bff8bf694
Merge pull request #5125 from akallabeth/clipboard_string_length_fix
...
Fix #5121 : Determine actual string length for input data
2018-12-11 10:30:39 +01:00
Armin Novak
66e71ef963
Added missing define for _wcsnlen for windows.
2018-12-10 14:02:57 +01:00
Armin Novak
d198f73081
Fix #5121 : Determine actual string length for input data
...
ConvertFromUnicode ignores '\0' sequences when the length of the input
string is given. Clipboard strings may be larger than the actual string
length and padded with random data leading to decoding errors.
Limit the length to the first occurrence of a '\0'.
2018-12-10 12:41:04 +01:00
Armin Novak
1e644fc37e
Added _wcsnlen function for WCHAR string length.
2018-12-10 12:39:32 +01:00
Armin Novak
e3c85eb3dc
removed strcpy
2018-12-06 10:17:05 +01:00
Armin Novak
3d487d0718
Fixed #5093 : Try to read timezone from java TimeZone first
...
persist.sys.timezone property might not exist, try to get the
timezone identifier from the java class first.
2018-12-05 10:41:14 +01:00
Armin Novak
22be8f21ae
Fix length type, use size_t
2018-12-04 09:34:22 +01:00
Armin Novak
d27cd1b19e
Fixed unit tests, use uniqe file names
2018-12-04 08:45:41 +01:00
Bernhard Miklautz
52d1b35a63
Merge pull request #5046 from akallabeth/silence_wlog
...
Do not compile extended debugging by default.
2018-11-26 11:10:59 +00:00
Armin Novak
96fe23193e
Initialize WtsApi32_WtsApiFunctionTable NULL
2018-11-22 17:30:16 +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
Martin Fleisz
947aa80033
Merge pull request #5016 from akallabeth/windows_server_build_fix
...
Windows server build fix
2018-11-21 16:02:47 +01:00
Armin Novak
17bbe7a23f
Do not compile extended authentication debugging by default.
2018-11-21 15:36:31 +01:00
Armin Novak
d8d30a0554
Fix #5037 : Fix calls to ntlm_print_av_pair_list
2018-11-21 09:18:38 +01:00
Armin Novak
eb57ed3a30
Refactored ntlm_av_pairs API
...
Tightened checks, cleaned up code and improved redability.
2018-11-20 11:08:31 +01:00
Armin Novak
2ee663f39d
Fixed CVE-2018-8789
...
Thanks to Eyal Itkin from Check Point Software Technologies.
2018-11-20 11:08:31 +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
Ilya Shipitsin
be8f70998a
remove not needed check
...
PVS analyzer: A part of conditional expression is always true: bWaitAll.
2018-11-15 01:51:44 +05:00
Bernhard Miklautz
a9bcc07d23
fix [winpr/sspi]: export symbols on all systems
2018-11-14 12:19:36 +01:00
Martin Fleisz
097ac0ee13
Merge pull request #4997 from akallabeth/use_bio_free_all
...
Replaced BIO_free with BIO_free_all
2018-11-12 13:55:36 +01:00
Martin Fleisz
6d6a2959c2
Merge pull request #4968 from akallabeth/timezone_updates
...
Simplified timezone update handling:
2018-11-09 12:07:43 +01:00
Martin Fleisz
a7f0da2440
Merge pull request #4961 from akallabeth/align_malloc_fix
...
Fixed #2039 : Check for overflow in calculations.
2018-11-09 11:58:04 +01:00
Armin Novak
71036fe0b2
Fixed #2039 : Check for overflow in calculations.
2018-11-09 10:50:53 +01:00
Armin Novak
5f4843191b
Replaced BIO_free with BIO_free_all
...
There is no point in using BIO_free with a custom recursion
to free up stacked BIOs if there is already BIO_free_all.
Using it consistently avoids memory leaks due to stacked BIOs
not being recursively freed.
2018-11-08 12:09:49 +01:00
Armin Novak
6a2d49e0ed
Simplified timezone update handling:
...
* Fix #4965 : Adjusted the timezone update script to initialize
structs properly.
* Updated the scripts to generate the files directly
* Added a small HOWTO
* Split zone information to separate files to allow automatic
update without further manual editing.
Create a timezone.c file that does conform to C rules.
2018-11-07 14:46:24 +01:00
Bernhard Miklautz
472f7ea936
fix [winpr/util]: memory leak in TestCmdLine
2018-11-05 12:29:06 +01:00
Bernhard Miklautz
29d3fea3d7
Merge pull request #4974 from Devolutions/android_timezone_fix
...
Remove unsupported call to fseek when file is opened with popen
2018-10-31 11:26:19 +00:00