Commit Graph

172 Commits

Author SHA1 Message Date
akallabeth
cd4d77af86 [settings] add deprecation warnings
direct struct access to rdpSettings now produces warnings if not
explicitly deactiaved by defining FREERDP_SETTINGS_INTERNAL_USE
2023-11-24 14:54:56 +01:00
akallabeth
1163cc4d5c [core] add internal settings.h include 2023-11-24 14:54:56 +01:00
akallabeth
7746c8f4ae [core,orders] fix #9402 polyline order processing 2023-09-21 10:00:19 +02:00
Armin Novak
5f8f69512b [core,orders] fix reading order number field
the field for delta rectangles/points/... are only transmitted if they
changed from the previous order of the same type. So keep the original
value and update only if a new one is read.
2023-09-04 12:24:57 +02:00
Armin Novak
12e6bbe13b [core,orders] log order fields not in packet 2023-09-04 11:32:35 +02:00
Armin Novak
1a1f422d79 [core,orders] unify delta point buffer allocation 2023-09-04 11:32:35 +02:00
Armin Novak
36b58c0688 [core,orders] abort if required filed is not found 2023-09-04 11:32:35 +02:00
Armin Novak
618102b28f [core,orders] update log message 2023-09-04 11:32:35 +02:00
Armin Novak
1bbed81041 [core,orders] fix checks for multi opaque rect 2023-08-28 13:07:28 +02:00
akallabeth
e51a5b33fb [core,orders] fix undefined variable, unify log strings 2023-08-03 13:54:03 +02:00
ehdgks0627
2496037f03 Standardize failure messages for order functions 2023-08-03 13:54:03 +02:00
ehdgks0627
105ce6c56b Update error message when update_read* function failed 2023-08-03 13:54:03 +02:00
Armin Novak
970f0c54e8 [stream] use const correct Stream_Pointer access 2023-06-08 08:09:33 +02:00
akallabeth
075506f6c8 [winpr,stream] use new Stream_CheckAndLogRequiredLength* 2023-01-25 14:27:32 +01:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
6fd71fe737 Eliminate Dead nested assignment warnings 2022-04-28 12:37:19 +02:00
akallabeth
ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak
504336f796 Removed internal members of rdpPrimaryUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
3006c973c4 Removed internal members of rdpAltSecUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
d210ac5e33 Removed internal members of rdpUpdate from API header 2022-01-18 11:24:23 +01:00
akallabeth
3ccb96d52f Fixed #7350: Warnings with Stream_StaticInit
* Properly initialize the stream buffer
* Add Stream_StaticConstInit accepting a const buffer
* Modify API to return a pointer to the stream initialized
2021-10-14 12:11:16 +02:00
akallabeth
217e0caa18
Bitmap update fix (#7349)
* Added checks for bitmap width and heigth values

Data received from the server might have invalid values for bitmap
with or height. Abort parsing if such a value is found.
Reported by Sunglin from the Knownsec 404 team & 0103 sec team

* Added checks for glyph width & height
2021-10-12 12:26:22 +02:00
akallabeth
7b7e2d6f32 Prefer constant division over multiplication for length checks 2021-09-21 08:55:22 +02:00
akallabeth
1ca7e1f7a0 Added option to disable graphics decoding in client code path 2021-09-20 10:59:59 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
akallabeth
a7cdd03809
Fixed check of orderLength for secondary orders (#7233)
The orderLength field of [MS-RDPEGDI] 2.2.2.2.1.2.1.1 might be
negative if not adjusted for the 13byes of the header.
2021-08-23 12:08:35 +02:00
akallabeth
4587ef976c Fixed default return for DrawOrderInfo 2021-01-28 14:08:35 +01:00
akallabeth
dfec6228e4 Added OrderInfo callback for primary, seconardy and altsec orders
This allows gathering statistics about which orders have been
received
2021-01-26 20:00:23 +01:00
Armin Novak
8c353e9292 Fixed problematic cast of integer mask to bool 2021-01-13 11:52:24 +01:00
akallabeth
6d8f355633 Fix warning #6515 2020-10-16 08:14:13 +02:00
akallabeth
c0284239a7 Fixed remarks. 2020-10-15 11:03:46 +02:00
akallabeth
ef8f1fd9f0 Refactored reading of optional order bytes 2020-10-15 11:03:46 +02:00
akallabeth
0456fc307c Fixed parsing of FastGlyph order. 2020-10-15 11:03:46 +02:00
Armin Novak
57b405ca26 Fixed compilation warnings. 2020-08-10 12:14:11 +02:00
Bernhard Miklautz
7f7a8f4d2f fix: code formatting 2020-07-20 15:29:44 +02:00
Bernhard Miklautz
efdc99528f new [orders]: BMF_24BPP support and some comments
* cached brush orders missed the BMF_24BPP documented case
  ([MS-RDPEGDI] 2.2.2.2.1.2.7)
* add some comments on secondary (brush) order details
2020-07-20 14:11:36 +02:00
Giovanni Panozzo
9f7e475c16 Fix seeking in Cache Brush and other Secondary Drawing Orders 2020-07-15 00:11:03 +02:00
akallabeth
57e7a99393 Added hint for errors due to missing offscreen-cache 2020-06-29 08:12:51 +02:00
Armin Novak
ce1a9d8d19 Fixed #6298: Mask CACHED_BRUSH when checking brush style 2020-06-23 09:24:35 +02:00
akallabeth
e7bffa64ef Fixed OOB read in update_recv_secondary_order
CVE-2020-4032 thanks to @antonio-morales for finding this.
2020-06-22 11:51:39 +02:00
akallabeth
b8beb55913 Fixed OOB read in update_read_cache_bitmap_v3_order
CVE-2020-11096 thanks @antonio-morales for finding this.
2020-06-22 11:51:38 +02:00
akallabeth
733ee32083 Fixed invalid access in update_recv_primary_order
CVE-2020-11095 thanks @antonio-morales for finding this.
2020-06-22 11:51:38 +02:00
Armin Novak
ff79636d33 TSG improvements
* Respect connection timeout during connect
* Better debug output
* Cleaned up data types,
2020-06-19 11:31:13 +02:00
Armin Novak
d1d8586374 Fixed #6200: Arraysize check 2020-05-20 15:02:24 +02:00
akallabeth
a73adecaf4 Fixed #6112: Segfault in update_decompress_brush
The iterators need to be signed for the loop check to work.
2020-05-06 13:31:57 +02:00
akallabeth
66d3b77d88 update_decompress_brush: explicit output length checks
The output length was just assumed to be >= 256 bytes, with this
commit it is explicitly checked.
2020-05-06 13:31:57 +02:00
akallabeth
232c7f4783 Abort order read on invalid element count. 2020-04-09 18:00:51 +02:00