Commit Graph

35 Commits

Author SHA1 Message Date
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 a64dd36073 [build] fixed const warnings 2023-06-12 16:32:23 +02:00
Armin Novak a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
akallabeth 050a2d0e74 [codec] fixed region16_union_rect
* If source and destination are equal, free the buffer on destination to
  avoid compiler warnings.
* Remove assert that is not required
2022-12-09 16:40:54 +01:00
akallabeth 1378c8e671
Fixed #7753: Step calculation in YUV decoder (#7758)
* Fixed #7753: Step calculation in YUV decoder

* Fixed rectangle_is_empty

* Added rectangle intersection check in YUV decoder

* Skip intersecting rectangles in YUV decoder

* Refactored YUV work object handling

* Allocate / free in yuv_context_new and yuv_context_free
* WINPR_ASSERT all function arguments

* Pass yuv_context_reset result from h264_context_reset

* Reset PTP_WORK buffer to NULL after use
2022-03-29 13:55:52 +02:00
akallabeth 8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Armin Novak 72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak 59b4988f56 Fixed compilation warnings. 2019-10-16 14:54:05 +02:00
Armin Novak 9fee4ae076 Fixed #5645: realloc return handling 2019-10-04 16:19:23 +02:00
Armin Novak 73a6e7052b Fixed free checks to eliminate bad free warnings. 2019-04-05 09:13:24 +02:00
Armin Novak b2c29158be Scanbuild warning, argument checks and leak fixes.
* Added Stream_GetRemainingCapacity to check remaining stream size
  before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Norbert Federa f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak df35c135d1 Fixed color conversion, unified GFX and updated API. 2016-10-06 13:42:58 +02:00
Nathan Kidd d68e58a9dc libfreerdp-codec: Make region16_rects() handle NULL nbRects
Now matches header documentation.  Also cleans up related doc grammar.
2016-02-12 10:11:51 -05:00
David FORT ff92a12ceb Fix a bug in region_union_rect()
When region_union_rect() was called with a rect that was above the region without
intersecting it, the first band was created too large. This patch fixes this and
add a unitary test.

All credits go to @nfedera that:
* found the bug;
* find a dataset to reproduce;
* code the unitary test;
* spotted a suspicious line that was the faulty one.
2015-09-30 21:14:43 +02:00
zihao.jiang 2a91988975 resolve comments from hardening 2015-03-21 00:04:30 +08:00
zihao.jiang ce06229499 fix tab/space style 2015-03-20 23:40:48 +08:00
zihao.jiang f94935224c Fixes extents of region16_intersect_rect.
See Issue #2443.
When there's more than 2 rectangles in the region structure, region16_intersect_rect would calculate extents by all 'intersected' sub rectangles.
But it always extend the extents to (0,0) because it initialize the new extents as (0,0,0,0) and union later rectangles with this empty point by simple MIN/MAX calculation.

Also fixed rectangle_is_empty although it has not been used yet. The function does not work as its name.
Reuse norbert case. That case is enough for the intersect fix, but the expected result is not correct. The test case is also fixed.
Added test case to check empty rectangle.
2015-03-20 20:55:06 +08:00
Marc-André Moreau fdde017526 libfreerdp-codec: allow region_uninit to be called multiple times 2015-02-05 15:10:24 -05:00
Armin Novak 595680d169 Prettiefied WLog messages. 2015-01-20 11:09:54 +01:00
Marc-André Moreau 09fc388e03 shadow: add RefreshRect/SuppressOutput support 2014-09-18 22:18:58 -04:00
Marc-André Moreau 6afd621d4c Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
Conflicts:
	server/Mac/mf_audin.c
	server/Mac/mf_event.c
	server/Mac/mf_info.c
	server/Mac/mf_mountain_lion.c
	server/Mac/mf_peer.c
	server/Mac/mf_rdpsnd.c
	server/Mac/mfreerdp.c
	server/shadow/CMakeLists.txt
2014-09-17 20:15:01 -04:00
Armin Novak 2f519d7f16 Replaced logging in libfreerdp with wlog defines. 2014-09-15 08:48:46 +02:00
Marc-André Moreau e1e8da9490 shadow: add ability to share rectangle within monitor 2014-09-10 16:27:24 -04:00
Armin Novak f4c133eaf8 Replaced custom logging mechanism with WLog wrapper. 2014-08-07 16:51:24 +02:00
Marc-André Moreau cd65a0d6b8 libfreerdp-codec: cleanup and fix insufficient rectangle array size in region16_union_rect 2014-06-20 12:35:21 -04:00
Marc-André Moreau c0ec800bfd freerdp: fix incorrect copyright headers 2014-05-22 15:56:47 -04:00
Zhang Zhaolong cb2fc70a5d codec: fix memory leak in case of realloc() failed. 2014-04-26 12:16:34 +08:00
Marc-André Moreau 004ad2123e libfreerdp-codec: fix typedef redefinitions 2014-02-28 16:17:36 -05:00
Marc-André Moreau 858923836c libfreerdp-codec: fix windows compilation for new region code 2014-02-15 21:57:33 -05:00
Hardening 115a1e863d Fixes in intersection + checks
Fix a bug in the extents of an intersection.
Add some checks and assert that helps when using the remoteFx encoder.
A speedup for intersection when bands are above the target rect.
2014-02-07 17:10:29 +01:00
Hardening 0915060f40 Fixes before pullreq
Replaced zmalloc by calloc.
Moved region from utils to codec.
Fixed some typo and corner cases.
2014-02-05 16:24:46 +01:00