Commit Graph

5875 Commits

Author SHA1 Message Date
akallabeth 8bdf92ca52
[utils] link m library if required 2024-05-14 20:45:38 +02:00
akallabeth aaded541d9
[core,client] replace cJSON with WinPR wrapper
use the new WinPR JSON wrapper API
2024-05-14 20:45:31 +02:00
akallabeth 1efefceb5c
[core,settings] refactor /network
* add CONNECTION_TYPE_INVALID
* default to CONNECTION_TYPE_AUTODETECT
* allow /network:invalid and /network:0 to disable
2024-05-14 11:18:29 +02:00
akallabeth a1d8754f1f
[core,autodetect] abort on unexpected message. 2024-05-14 11:07:50 +02:00
Armin Novak e272eb3966 [warnings] fix Wshadow warnings 2024-05-08 15:30:01 +02:00
Armin Novak 47ac961cb9 [core,settings] initialize DynamicDSTTimeZoneKeyName 2024-05-08 10:08:08 +02:00
akallabeth ef83633c01 [codec,nsc] length checks in nsc_rle_decompress_data 2024-04-26 09:26:07 +02:00
akallabeth d5f8b337c4 [codec,nsc] add restrict keyword 2024-04-26 09:26:07 +02:00
Armin Novak e9bfd585ae [core,capabilities] ensure ImeFileName is '\0' terminated 2024-04-25 10:27:58 +02:00
Armin Novak e37acf08b5 [core,redirection] free redirection::TargetNetAddresses
during some testcases the packet can be received on already allocated
TargetNetAddresses. So clean up the field before reusing it.
2024-04-25 10:27:58 +02:00
Armin Novak c909253b11 [core,info] check '\0' termination after length check 2024-04-25 10:27:58 +02:00
Armin Novak c2e899b6df [core,fuzzer] fix testcases
rdp_recv_save_session_info is a client side only function, remove from
server side tests
2024-04-24 15:55:30 +02:00
Armin Novak b757276034 [core,redirection] fix reading of TargetNetAddressesCount
read to local variable first, check for validity and only after
allocation update the settings value.
2024-04-24 15:55:30 +02:00
Armin Novak 4ce4a6d3fb [codec,clear] check destination offsets
clear_decompress_subcodecs_data might have inavlid offsets, check if
they fit the destination buffers
2024-04-24 15:55:30 +02:00
akallabeth 3fe9363592 [core,capabilities] abort on invalid protocolVersion
* TS_GENERAL_CAPABILITYSET::protocolVersion must be
  TS_CAPS_PROTOCOLVERSION(0x200) see [MS-RDPBCGR] 2.2.7.1.1
  General Capability Set (TS_GENERAL_CAPABILITYSET)
* Default value of FreeRDP_CapsProtocolVersion must be
  TS_CAPS_PROTOCOLVERSION(0x200)
2024-04-23 17:13:13 +02:00
Мартынов Максим Сергеевич 890d87f81a Fix protocolVersion capability reset 2024-04-23 16:03:30 +02:00
akallabeth fc21b82880 [core,timezone] initialize ClientTimeZone early
Initialize ClientTimeZone in freerdp_settings_new to allow replacing the
default later on in command line parser or client connection callbacks
2024-04-23 09:54:52 +02:00
akallabeth 1d6460c5f7 [core,redirection] add sanity check for TargetNetAddress
Abort on implausible TargetNetAddressLength values. (check remaining
data length to determine that)
2024-04-23 09:40:36 +02:00
akallabeth 449e8b82f1 [core,capabilities] check TS_BITMAPCACHE_CAPABILITYSET_REV2
Check value of TS_BITMAPCACHE_CAPABILITYSET_REV2::numCellCaches for out
of range.
2024-04-23 09:40:36 +02:00
Ondrej Holy 73991c48ce [winpr,ncrypt] obtain module path from provider
Currently, the module path is hardcoded in the build_pkinit_args function.
Let's obtain the module path from provider as a preparation for the
follow-up changes.
2024-04-22 17:42:52 +02:00
akallabeth 8b616f4fad [core,capabilities] ensure destination array exists
ensure the destination array in rdpSettings is large enough to hold the
copy.
2024-04-22 17:41:46 +02:00
akallabeth 703808591e [ci,fuzzer] split fastpath tests
use dedicated server and client context to test the functions
2024-04-22 11:02:04 +02:00
akallabeth 5b4e39fd7e [core,orders] shift unsigned value
The delta value read is signed, but the operations are done on an
unsigned.
2024-04-22 11:02:04 +02:00
akallabeth cb15c1c78a [core,update] fix missing plausibility check
abort parsing of cache brush if not enough data is available.
2024-04-22 11:02:04 +02:00
akallabeth 626d10a94a [core,redirection] fix length of redirection strings
length field is in bytes, when converting from UCS-2 use size in WCHAR
2024-04-22 11:02:04 +02:00
akallabeth a6320dc6b7 [ci,fuzzer] run read functions as client and server 2024-04-22 09:30:36 +02:00
akallabeth 71e463e31b [core,info] fix missing check in rdp_write_logon_info_v1 2024-04-21 14:28:24 +02:00
akallabeth 48013d75fc [core,test] add fuzzer for receive functions 2024-04-21 14:28:24 +02:00
akallabeth a95426e7c4 [core,update] return if gdi is NULL 2024-04-21 14:28:24 +02:00
akallabeth db09d1d7f8 [core,update] fix leak on error termination 2024-04-21 14:28:24 +02:00
akallabeth 7f9c5d84ad [core,peer] assert size of peer context 2024-04-21 14:28:24 +02:00
akallabeth 6430945ce0 [codec,color] fix out of bound read 2024-04-21 11:00:47 +02:00
akallabeth 5e5d27cf31 [codec,zgfx] allocate in segment steps
do not trust the uncompressedSize of a ZGFX_SEGMENTED_MULTIPART and
allocate the output buffer in steps after decoding a segment.
2024-04-20 21:20:44 +02:00
akallabeth 9314b5492b [codec,clear] use size_t types for sizes 2024-04-20 21:20:44 +02:00
akallabeth 0ca4973a67 [codec,clear] vBarShortEntry count check 2024-04-20 21:20:44 +02:00
akallabeth b88c767603 [codec,color] use ssize_t/SSIZE_T for indices 2024-04-20 21:20:44 +02:00
akallabeth 1a755d898d [codec,interleaved] fix offset error 2024-04-20 21:20:44 +02:00
akallabeth 0b4db55707 [codec,nsc] check for valid ColorLossLevel 2024-04-20 21:20:44 +02:00
akallabeth 8779ebf8d4 [ci,oss-fuzz] run all codec tests 2024-04-19 11:26:47 +02:00
akallabeth a1c373314e [codec,interleaved] fix bounds checks 2024-04-19 11:26:47 +02:00
akallabeth b1f11bd8a4 [codec,progressive] move update to frame change 2024-04-19 09:49:02 +02:00
akallabeth 41dd15c5e8 [codec,progressive] revert 4e24b966c8
do not reset progressive surface numUpdatedTiles after
progressive_decompress pass. The updates might accumulate until the
frameId changes, only then reset.
2024-04-19 09:49:02 +02:00
akallabeth 71e78bedd7 [warnings] fixed sign and const
* fix various char/BYTE sign warnings
* fix various const warnings
* fix format string size_t
* remove unused CMake variables
2024-04-18 11:05:58 +02:00
Armin Novak 14286904e1 [tests] fix mismatched allocation function 2024-04-17 18:47:16 +02:00
Armin Novak 28e9094f08 [gcc] fix missing malloc warning macros
* Add missing WINPR_ATTR_MALLOC
* Add missing WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
2024-04-17 18:47:16 +02:00
akallabeth 9d7c98f4d0 [codec,ncrush] fix index out of bound check 2024-04-16 21:20:04 +02:00
akallabeth b7888e9b3b [codec,ncrush] fix bounds checks 2024-04-16 20:29:45 +02:00
akallabeth f3b2aea781 [cmake] add fuzzer tests
tests imported from https://github.com/ergnoorr/fuzzrdp

reported by Evgeny Legerov of Kaspersky Lab.
2024-04-16 13:06:22 +02:00
akallabeth 0a0df77c39 [build,ipp] drop support for IPP
Intel Performance Primitives do not have a test setup in FreeRDP and
most likely no longer compile.
2024-04-16 12:44:38 +02:00
akallabeth ecfafe4ad0 [codec,interleaved] fix off by one length check 2024-04-16 11:25:27 +02:00