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
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
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
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
Jonathan Lafontaine
610a882f1d
remove unsupported call to fseek when file is opened with popen
2018-10-30 16:47:06 -04: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
Armin Novak
987ca5ec6a
Fixed another bunch of warnings.
2018-10-24 14:36:12 +02:00
Armin Novak
86f08981ef
Fixed warnings of uninitialized struct values.
2018-10-24 13:25:18 +02:00
Armin Novak
46d6aa4e2b
Fixed cast warnings for thread wrapper
2018-10-24 13:24:45 +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
Martin Fleisz
168bab905d
Merge pull request #4916 from Devolutions/ios-path-fix
...
Fix iOS path detection functions
2018-10-05 09:50:27 +02:00
Sébastien Duquette
2497fcf941
Use fnObjectEquals in ArrayList_Remove.
2018-10-04 16:57:29 -04:00
Richard Markiewicz
ee7b5460b5
freerdp - fix iOS directory paths
2018-10-04 16:54:40 -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
Armin Novak
fad20be6e6
Fixed missing includes.
2018-08-27 14:34:42 +02:00
Armin Novak
00a5d06fc1
Fixed coverity memory leak.
2018-08-27 14:34:42 +02:00
Armin Novak
62c1696d4c
Removed use of unchecked sprintf
2018-08-27 14:34:42 +02:00
Armin Novak
114abad767
Removed use of strcpy.
2018-08-27 14:34:09 +02:00
Armin Novak
d7d5567891
Fixed missing const.
2018-08-24 13:40:36 +02:00
Martin Fleisz
8248dcb3bb
Merge pull request #4816 from akallabeth/drive_cmd_fix
...
Fix #4680 : Return proper directory name.
2018-08-24 09:45:26 +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
Armin Novak
ab18f8f222
Fix #4680 : Return proper directory name.
2018-08-23 10:04:26 +02:00
Ondrej Holy
95a043e0eb
winpr/winsock: Fix leak found by covscan
...
0 is valid return value from socket().
leaked_handle: Handle variable "fd" going out of scope leaks the handle.
2018-08-23 09:11:24 +02:00
Ondrej Holy
0a11a06dc9
winpr/winsock: Format code by astyle
...
Run ./scripts/format_code.sh before the following changes.
2018-08-23 09:11:24 +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
Ondrej Holy
35bccd5262
winpr/sspi/ntlm: Fix leak found by covscan
...
leaked_storage: Variable "sam" going out of scope leaks the storage it points to.
leaked_storage: Variable "s" going out of scope leaks the storage it points to.
leaked_storage: Variable "snt" going out of scope leaks the storage it points to.
2018-08-22 14:34:02 +02:00
Ondrej Holy
724bc7acd2
winpr/io/device: Fix leak found by covscan
...
leaked_storage: Variable "lpPipePath" going out of scope leaks the storage it points to.
2018-08-22 14:34:02 +02:00
Ondrej Holy
df9d0fab80
winpr/io/device: Format code by astyle
...
Run ./scripts/format_code.sh before the following changes.
2018-08-22 14:34:02 +02:00
Ondrej Holy
acbd6e6322
winpr/file: Fix leak found by covscan
...
overwrite_var: Overwriting handle "h" in "h = (HANDLE)0xffffffffffffffff" leaks the handle.
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
8b8e85271c
Fixed #4793 : Return correct file handle for existing directory
2018-08-13 13:17:56 +02:00