1477 Commits

Author SHA1 Message Date
Armin Novak
4475e21b7e [codec,rfx] return nullptr if input parameters are invalid
rfx_encode_messages maxDataSize must be > 1024 or the function will
fail. Add a check to abort early if this is the case.
while this is a usage error, it is helpful to have proper error handling
in the function as well.
2026-03-03 09:30:33 +01:00
Armin Novak
35831303ea [various] add proper return checks 2026-03-02 18:32:38 +01:00
Armin Novak
e6fca2c021 [winpr,stream] Fix Stream_SetPosition return checks 2026-03-02 11:37:20 +01:00
Armin Novak
5a532269ef [winpr,stream] Check Stream_SetLength return 2026-03-02 11:08:08 +01:00
Armin Novak
92ab55c5e1 [winpr,stream] Add Stream_ResetPosition
A helper function that does not require return checks, in contrast to
Stream_SetPosition, which might fail.
2026-03-01 06:11:59 +01:00
Armin Novak
6482b7a92f [codec,h264] validate rectangles before use 2026-02-28 11:53:28 +01:00
Armin Novak
ea77d2d922 [nodiscard] fix all InitOnceExecuteOnce usages 2026-02-27 15:52:28 +01:00
Armin Novak
89ab3c6c1b [nodiscard] Fix all winpr_RAND usages
* Check return value and act on it.
* Initialize arrays that were missed before.
2026-02-27 15:52:26 +01:00
Armin Novak
5c510af477 [c23,freerdp] replace NULL with nullptr 2026-02-26 15:06:27 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
0531803808 [warnings] make function declaration names consistent
Use the same parameter names for declaration and implementation.
2026-02-26 10:35:25 +01:00
Armin Novak
01d680a081 [codec,fdk] revert use of WinPR types
Due to naming collissions no WinPR header may be included here.
2026-02-25 20:05:42 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
Armin Novak
a79e307cb9 [codec,dsp] fix integer sign warnings 2026-02-25 15:05:51 +01:00
Armin Novak
ede1dd980f [codec,dsp] fix opus constant definition type 2026-02-25 15:05:47 +01:00
Armin Novak
e9723d1b61 [attributes] update attribute definitions
* support C++
* support C23
* replace __inline et al with C11 inline
2026-02-25 11:51:11 +01:00
Armin Novak
8016117eb7 [codec,dsp] fix warnings 2026-02-25 10:20:02 +01:00
Armin Novak
4e4f84d33d [libfreerdp] mark internal functions [[nodiscard]] 2026-02-24 11:54:00 +01:00
Armin Novak
1dde0b3eeb [codec,progressive] refine progressive decoding
Refinement of 1a7a4c508c that might
produce glitches.
2026-02-20 17:45:18 +01:00
Armin Novak
e05252cdea [codec,dsp] fix duplicate NULL checks 2026-02-18 13:24:50 +01:00
Armin Novak
df64d00a97 [warnings,api] fix -Wunused-result
With marking publid API [[nodiscard]] some problematic error checks in
the core library were uncovered. This commit addresses these
shortcomings.
2026-02-17 11:07:08 +01:00
Armin Novak
f3d23da0ae [codec,nsc] update function docs
* add doxygen for functions
* add support for scanline value 0
2026-02-17 09:15:33 +01:00
Armin Novak
169971607c [codec,nsc] fix use of nsc_process_message
the second width/height argument should reflect the destination buffer
pixel size
2026-02-17 08:38:04 +01:00
Armin Novak
24a23e3028 [codec,nsc] deprecate nsc_decompose_message
this function is just a wrapper around nsc_process_message with some
wStream handling around it. Since proper length checks are missing
deprecate it completely.
2026-02-17 08:32:39 +01:00
Armin Novak
caf6e7f2ec [codec,nsc] log decoder function parameter issues 2026-02-17 08:24:20 +01:00
Armin Novak
7d8fdce2d0 [codec,clear] fix destination checks
check against the correct nDstWidth/nDstHeight
2026-02-16 19:56:55 +01:00
Armin Novak
a0be5cb87d [codec,planar] fix missing destination bounds checks 2026-02-16 10:00:23 +01:00
akallabeth
a25b90adc2 Merge pull request #12311 from akallabeth/winpr-attr-nodiscard-fkt-ptr
Winpr attr nodiscard fkt ptr
2026-02-16 09:32:52 +01:00
Armin Novak
e0e6a7f800 [freerdp,warnings] properly handle function return 2026-02-16 09:18:37 +01:00
Armin Novak
13616cc67e [freerdp,codec] mark function pointers [[nodiscard]] 2026-02-16 09:18:35 +01:00
Armin Novak
f4d74c33fd [codec,nsc] bounds checks and doxygen
* Improve doxygen for nsc_process_message
* Improve bounds checks for nsc_process_message
2026-02-15 19:32:38 +01:00
Armin Novak
0746639629 [codec,clear] fix missing destination boundary checks 2026-02-15 19:19:07 +01:00
Armin Novak
f5e20403d6 [codec,color] fix input length checks
* check cbBitsMask meets expected length
* Add logging for length failures
2026-02-13 19:39:21 +01:00
Armin Novak
af6e0e6241 [codec,test] replace fscanf in unit test 2026-02-10 16:38:19 +01:00
Armin Novak
39e33d9e9d [utils,helpers] add application details getter/setter
* Allow an application to set a vendor/product/version namespace to search
  for configuration files/settings/...
* Replace all FREERDP_VENDOR_STRING and similar macros with these
  getters.
2026-01-29 22:47:45 +01:00
akallabeth
7990eec166 [freerdp] mark all WINPR_ATTR_MALLOC also nodiscard 2026-01-26 13:39:39 +01:00
akallabeth
84d3d99338 [clang-tidy] clean up code warnings 2026-01-19 13:05:26 +01:00
akallabeth
fb8efd45f2 [c,format] fix format string and review warnings 2026-01-16 13:36:14 +01:00
akallabeth
93952b87c3 [warnings,format] fix format string warnings 2026-01-16 13:22:45 +01:00
akallabeth
90f62bd353 Merge pull request #12150 from akallabeth/wlog-printf
Wlog printf format string checks
2026-01-16 13:01:55 +01:00
akallabeth
243ecf804b [codec,clear] check clear_decomress glyphData
Check destination coordinates and lengths against the actual sizes. Log
every truncation accordingly
2026-01-16 12:22:46 +01:00
akallabeth
3bc1eeb4f6 [codec,color] add freerdp_glyph_convert_ex
The function freerdp_glyph_convert does not check input buffer length,
deprecate it and provide a replacement that does properly check.
2026-01-16 12:09:26 +01:00
akallabeth
e7b3365078 [c,printf] fix wlog format string to match arguments 2026-01-16 11:41:00 +01:00
akallabeth
b7b4af9d29 [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:57 +01:00
akallabeth
0925a105f7 [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:55 +01:00
akallabeth
56adce5914 [c,printf] fix wlog format string to match arguments 2026-01-16 11:40:52 +01:00
akallabeth
1bab198a2e [codec,planar] fix decoder length checks 2026-01-15 13:45:34 +01:00
akallabeth
f8688b57f6 [codec,clear] fix off by one length check 2026-01-15 13:45:32 +01:00
akallabeth
25102b432f [codec,clear] fix missing length checks 2026-01-15 13:45:29 +01:00
akallabeth
c4391827d7 [codec,clear] fix clear_resize_buffer checks 2026-01-15 13:45:27 +01:00