Armin Novak
18a3fcf2fc
Updated wStream API and added torough checks
...
* Do length/capacity checks in every read/write/seek function
if WINPR_ASSERT is defined.
* Ensure s->pointer is valid, e.g. within s->buffer + s->capacity
(Stream_Rewind, Stream_Seek, ...)
* Add return values to Stream_Set* functions so inalid arguments
can be reported to the caller
* Deprecated problematic stream manipulation functions
(Stream_SetBuffer, Stream_SetPointer, Stream_SetCapacity)
* Ensure length/capacity functions never return a value larger
than the actual length/capacity
2021-10-06 09:49:07 +02:00
akallabeth
1c84690c2f
Fixes from tests ( #7308 )
...
* Fixed memory leak in tls_verify_certificate
* Fixed missing NULL checks
* Fixed missing checks for FreeRDP_DeactivateClientDecoding
* Added WINPR_ASSERT for client common new/free
* Added /disable-output switch to deactivate client decoding
Allows low resource remote connections that do not require visual
feedback. (e.g. load testing/...)
2021-09-21 09:56:56 +02:00
Armin Novak
1ee8370f28
Fixed leak in TestPipeCreateNamedPipeOverlapped.
2021-09-20 10:59:59 +02:00
Armin Novak
aeb2415af9
Cleaned up NamedPipeOverlapped test.
2021-09-20 10:59:59 +02:00
Armin Novak
b05eb8d834
Fixed thread related changes:
...
* Fixed typo
* Fixed wrong #ifdef
2021-09-20 10:59:59 +02:00
akallabeth
1ca7e1f7a0
Added option to disable graphics decoding in client code path
2021-09-20 10:59:59 +02:00
akallabeth
cb5ccec212
Cleaned up some possible race conditions with threads
...
* ExitThread no longer NORETURN, this eases handling of threads.
* Fixed a (rare) race condition when starting a thread
* Made global thread_list optional (you lose the exit code from
ExitThread)
2021-09-20 10:59:59 +02:00
akallabeth
dc07b10d41
Cleaned up thread pool initialisation
2021-09-20 10:59:59 +02:00
akallabeth
47277a4504
Improved debug logging when operating on invalid handles.
...
* Added backtrace to log
2021-09-20 10:59:59 +02:00
akallabeth
b69156d79c
Eliminated spammy log messages from backtrace functions
2021-09-20 10:59:59 +02:00
akallabeth
162227ce78
Cleaned up GetCombinedPath
2021-09-20 10:59:59 +02:00
akallabeth
76979a47fb
Added new CMake option to dump event handles in use
2021-09-20 10:59:59 +02:00
akallabeth
53a52a055d
Added missing WINPR_ASSERT to MessageQueue
2021-09-20 10:59:59 +02:00
akallabeth
d80b418bbc
Added object copy support to queue
...
* Added object copy support to Queue_Enqueue
* Added Queue_Discard to clear the top of the queue
* Added some doxygen for queue functions.
2021-09-20 10:59:59 +02:00
Armin Novak
1d9e886a7f
Fixed timezone detection on linux.
...
Fix originally proposed via IRC by myth0s
Original changeset at https://paste.debian.net/hidden/0a03314a/
2021-09-20 09:39:40 +02:00
akallabeth
ab90ddc781
Fixed clang pragma
2021-09-14 09:45:03 +02:00
Armin Novak
673fb46836
Fixed uninitialized warnings
2021-09-10 08:16:25 +02:00
Armin Novak
0fe1e2359e
Fixed all reserved-id-macro warnings
2021-09-10 08:16:25 +02:00
Armin Novak
ba0da04217
Fixed compilation warnings and duplicate defines
2021-09-09 08:53:20 +02:00
Armin Novak
4daa09c3e5
Fixed missing checks for queue functions
2021-09-09 08:53:20 +02:00
Armin Novak
0f8c52b9ca
Fixed const warnings with argument parser
2021-09-09 08:53:20 +02:00
Armin Novak
c8571dd5fd
Replaced chmod with safer fchmod
...
* Use fchmod so the file may not change underneath
* Add unit tests for SetFileAttributesA
* Add warning logs for unsupported flags
2021-09-06 10:11:14 +02:00
Armin Novak
fbae9ba88c
Added LoadLibraryX and LoadLibraryExX
...
These functions take a UTF8 string and load a library with
LoadLibraryW under windows.
2021-09-03 08:29:15 +02:00
Armin Novak
737f5a2036
Fixed argument const correctness
2021-08-27 13:21:02 +02:00
akallabeth
f1bde376b1
Raw channel send ( #7255 )
...
* Added raw channel data write function
* Use nego_set_state
* Added ArrayList_ForEachAP
* Provide va_copy for older VS compilers
2021-08-26 16:17:51 +02:00
Armin Novak
68f24477f6
Fixed compilation warnings on mac
2021-08-26 15:08:28 +02:00
Armin Novak
55d2363efb
Removed alloca use from WaitForMultipleObjectsEx
2021-08-25 13:41:38 +02:00
Armin Novak
5afa592244
Fixed cast-qual warnings
2021-08-24 11:10:51 +02:00
Armin Novak
cbb06a7c17
Fixed DsParse implementations and tests
...
* Implemented DsMakeSpnW
* Removed unimplemented DsCrackSpnA and DsCrackSpnW
2021-08-24 10:45:57 +02:00
Armin Novak
04ff6b8824
Implemented TestFileDeleteFile
2021-08-24 10:45:57 +02:00
Armin Novak
af0ce13d8a
Removed not implemented module
2021-08-24 10:45:57 +02:00
Armin Novak
5eea7fc12d
WINPR_UNUSED argc, argv for unit tests
2021-08-24 10:45:57 +02:00
Armin Novak
f515bd4560
Fixed shadowing and type errors
2021-08-24 10:45:57 +02:00
Pascal Nowack
8fe794b312
winpr/clipboard: Omit last line ending for gnome-copied-files
...
Every uri in the x-special/gnome-copied-files mime type is separated by
a '\n' char.
However, not every line ends with '\n'. The last line MUST not include
the new line character.
2021-08-19 09:08:11 +02:00
Mike Gilbert
5208a67ea7
Fix TestUnicodeConversion on big endian machines ( #7219 )
...
Wide character literals are stored in native byte order.
Use an array of bytes as a reference instead.
Fixes: https://github.com/FreeRDP/FreeRDP/issues/6968
2021-08-16 22:11:03 +02:00
Ondrej Holy
67f3fff2c8
winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0 ( #7210 )
...
* winpr/crypto: Exit cleanly when EVP_EncryptInit_ex fails
The `EVP_EncryptInit_ex` function may fail in certain configurations.
Consequently, FreeRDP segfaults in `EVP_CIPHER_CTX_set_key_length`.
Let's handle the `EVP_EncryptInit_ex` failures and exit cleanly in
such case.
* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0
Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.
Relates: https://github.com/openssl/openssl/issues/14392
Fixes: https://github.com/FreeRDP/FreeRDP/issues/6604
2021-08-03 15:28:58 +02:00
Armin Novak
00c5a42eef
Fixed warnings in TestLinkedList
2021-08-02 10:28:06 +02:00
Armin Novak
610396e197
Fixed compilation warnings
...
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Mike Gilbert
0c81c73c8d
winpr: avoid calling FIPS_mode() with OpenSSL 3.0
...
Fixes: 26bf2816c3
2021-08-02 08:27:07 +02:00
ddoe
fb3f85779b
fixup! Improvement: Add a way to get timezone from environment. Firstly get timezone from environment. If not present, use file method
2021-07-20 15:31:57 +02:00
ddoe
badc57984e
Improvement: Add a way to get timezone from environment.
...
Firstly get timezone from environment. If not present, use file method
2021-07-20 15:31:57 +02:00
Martin Fleisz
74c6ad9906
test: Add unit test for CommandLineParseCommaSeparatedValuesEx
2021-07-07 09:07:46 +02:00
Martin Fleisz
a29cffbb6d
winpr: Fix parsing of comma separated values if list is an empty string
2021-07-07 09:07:46 +02:00
Alexandru Bagu
9c259f09ec
fix setValue for HashTable
2021-06-28 09:12:40 +02:00
Biswapriyo Nath
a22bd407b0
winpr: Fix typo in NTLM_AV_ID member.
...
According to Microsoft specifications[1] the 10th member is named as MsvAvChannelBindings.
[1]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/
2021-06-23 12:04:29 +02:00
Armin Novak
8ef57bf296
Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
...
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
akallabeth
b453d5e40e
Fixed rdtk, uwac and winpr standalone builds
2021-06-22 08:54:18 +02:00
Ali Abdel-Qader
c0e29f7f19
Re-added "extern" to ntlm_export.h symbols
2021-06-19 09:49:41 +02:00
Armin Novak
4dfee30934
Fixed smartcard related warnings
2021-06-18 11:32:16 +02:00
Armin Novak
09cf11ecf0
WinPR: Fixed warnings, added assertions
2021-06-18 11:32:16 +02:00