akallabeth
64486828bb
[winpr,crt] fix winpr_aligned_offset_recalloc
...
the copied data was taken from the wrong offset
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
734ae69756
[winpr] fix some msan warnings
...
initialize local stack variables
2023-06-07 09:14:45 +02:00
fifthdegree
ba7fdcb5f0
Move alloc_sprintf into the winpr string api
2023-05-23 06:04:55 +02:00
akallabeth
4a006322af
[winpr,clipboard] fix url unescape for file uri
2023-05-12 13:57:56 +02:00
Marc-André Moreau
32264b90cc
add WITH_UNICODE_BUILTIN option to use built-in UTF conversion functions
2023-04-18 16:51:08 -04:00
akallabeth
37aaa7802a
[winpr,crt] added winpr_aligned_calloc
2023-03-28 11:34:52 +02:00
akallabeth
ee07a13130
[cleanup] fix compiler warnings
2023-01-26 09:30:17 +01:00
Armin Novak
641022b795
[logging] remove __FUNCTION__ from actual message
...
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth
92d3e3c64a
[winpr] use WINPR_ prefix for conditional includes
2023-01-10 17:38:00 +01:00
akallabeth
d4808dd3e1
Fixed various compiler warnings
2022-12-09 15:58:26 +01:00
akallabeth
7ab917dca8
Fixed Wsign-compare warnings
2022-12-09 15:58:26 +01:00
Armin Novak
bd7e2263ad
fixed const and type cast warnings
2022-12-09 15:58:26 +01:00
akallabeth
3ddf99ad64
Fixed Wformat warnings
2022-12-09 15:58:26 +01:00
Armin Novak
bbf893a5d8
[winpr,crt] fix unicode conversion functions
...
There are subtle differences between MultiByteToWideChar,
WideCharToMultibyte and the ICU equivalents
2022-11-29 15:42:10 +01:00
akallabeth
66dad5deae
fixed review issues
...
* Overallocation in unicode functions
* Removed useless statements
* Fixed loop indices
2022-11-28 10:42:36 +01:00
Armin Novak
2784d54d6f
Deprecate MultiByteToWideChar and WideCharToMultiByte
2022-11-28 10:42:36 +01:00
Armin Novak
6f2d7f94cf
Deprecate ConvertFromUnicode and ConvertToUnicode
2022-11-28 10:42:36 +01:00
Armin Novak
0fb8c9e87e
[winpr,crt] Added ConvertMszWCharNToUtf8*
2022-11-28 10:42:36 +01:00
akallabeth
4f7114a140
[winpr,crt] Added ConvertMszUtf8NToWChar*
...
A conversion function that can handle multistrings (e.g. each element is
'\0' delimited, termination is '\0\0')
2022-11-28 10:42:36 +01:00
akallabeth
5c91c30a18
[winpr,crt] Added new unicode conversion functions
...
* Added functions converting WCHAR to/from UTF-8 with given buffers
and proper size_t arguments to have a centralized check for
integer overflows on RDP deserialization
* Added allocating functions converting WCHAR to/from UTF-8 as
convenience
2022-11-28 10:42:36 +01:00
akallabeth
5ae159303f
[winpr,crt] Added unicode conversion backends
...
* Support apple with NSString
* Support android via JNI
* Split ICU to own file
2022-11-28 10:42:36 +01:00
akallabeth
113290c35c
[winpr,string] Use size_t arguments
...
* Use size_t arguments for ByteSwapUnicode, ConvertLineEndingToLF
and ConvertLineEndingToCRLF
* Simplify code of line conversion functions
2022-11-28 10:42:36 +01:00
Armin Novak
9adc1e4b08
Fixed -Wunreachable-code-return
2022-11-21 10:12:31 +01:00
akallabeth
d71174d091
[winpr, crt] Added wcsstr implementation
2022-11-14 09:28:22 +01:00
akallabeth
cf5cb35697
[winpr, crt] Fix wcs*cmp and wcs*len checks
2022-11-14 09:28:22 +01:00
akallabeth
ed57dd37b9
Added function _wcsncmp
...
* Compare WCHAR strings up to n characters
2022-11-14 09:28:22 +01:00
akallabeth
bf56a39e6f
Fixed #8090 : Duplicate definition of strndup ( #8102 )
...
* Fixed #8090 : Duplicate definition of strndup
* Moved strndup detection to winpr
Co-authored-by: Armin Novak <anovak@thincast.com>
2022-08-02 09:15:38 +02:00
akallabeth
05b339b0b1
Added strndup replacement
2022-07-04 14:31:08 +02:00
akallabeth
bc8b4ade1c
reformatted
2022-06-23 08:48:39 +02:00
akallabeth
f25261e271
Unifiy string append functions
2022-06-17 08:41:46 +02:00
David Fort
77413f49b2
winpr: rework alignment functions
...
_align_XXX functions aren't widely available depending on the C runtime. That causes
problems with mingw where we can easily have some runtime mixes (which lead to mysterious
segfaults most of the time). This patch introduce winpr_aligned_XXX functions that will
either use the function available, or use an emulation layer.
2022-05-12 11:36:01 +02:00
David Fort
a612ca4ba2
winpr: fix unitary test when CreateProcess is CreateProcessW
...
As the second argument of CreateProcessW is modified to split with spaces and so
this can not be a const arg.
2022-05-05 13:11:18 +02:00
akallabeth
6bc7f6ca88
Fixed cast-qual warnings
2022-04-28 12:37:19 +02:00
akallabeth
1dcc5a180a
Fixed warnings
2022-04-28 11:24:51 +02:00
Armin Novak
2dc98adb62
Updated _wcschr and _wcsrchr to match MSDN spec
2022-04-27 19:42:04 +02:00
Armin Novak
6ed50b4b1d
Refactored WinPR includes
2022-03-03 11:26:48 +01:00
Armin Novak
c0a39c2db8
Fixed TestUnicodeConversion warning
2022-02-22 12:21:21 +01:00
Armin Novak
1b71bba2a0
Fixed compilation warnings
2022-02-22 11:29:56 +01:00
akallabeth
3c61a31f65
Fixed ICU include directories
2022-02-17 09:53:52 +00:00
Armin Novak
10e40147fb
Fixed various const warnings
2022-02-01 10:25:37 +00:00
akallabeth
e72d502b8d
Fixed #7363 : Length checks in ConvertUTF8toUTF16 ( #7365 )
2021-10-15 09:39:50 +02:00
Armin Novak
5afa592244
Fixed cast-qual warnings
2021-08-24 11:10:51 +02:00
Armin Novak
5eea7fc12d
WINPR_UNUSED argc, argv for unit tests
2021-08-24 10:45:57 +02:00
Armin Novak
f515bd4560
Fixed shadowing and type errors
2021-08-24 10:45:57 +02:00
Mike Gilbert
5208a67ea7
Fix TestUnicodeConversion on big endian machines ( #7219 )
...
Wide character literals are stored in native byte order.
Use an array of bytes as a reference instead.
Fixes: https://github.com/FreeRDP/FreeRDP/issues/6968
2021-08-16 22:11:03 +02:00
Armin Novak
610396e197
Fixed compilation warnings
...
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak
09cf11ecf0
WinPR: Fixed warnings, added assertions
2021-06-18 11:32:16 +02:00
Armin Novak
1af7ef2f1b
Fixed compilation warnings and typos
2021-06-16 15:21:56 +02:00
akallabeth
2ea7ac0c06
Unified bin to hex and hex to bin conversion
...
* Added new functions in WinPR
* Added unit tests for new functions
* Replaced existing (internal) conversion functions
2021-04-19 10:45:21 +02:00