Commit Graph

182 Commits

Author SHA1 Message Date
akallabeth
cc6850bf21
[warnings] fix format nonliteral
add pragma to suppress format nonliteral warnings where appropriate
2024-09-12 09:08:53 +02:00
akallabeth
36c3184a0f
[warnings] fix clang-tidy issues in libfreerdp 2024-08-29 15:34:22 +02:00
akallabeth
15456e1ee1
[warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
akallabeth
1d33095500
[warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +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
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
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
akallabeth
ba8cf8cf21 [build] fix Wmismatched-deallocator warnings
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
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