summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2021-08-11 11:03:22 -0400
committerMike Gilbert <floppym@gentoo.org>2021-08-11 11:04:15 -0400
commit273f561c07735891c90aca6b371ba9ac96ed3d0a (patch)
treeb521c6054b45ed53478938fd6901c115705d3eaa /net-misc
parentprofiles: apply net-proxy/polipo mask only to vulnerable versions (diff)
downloadgentoo-273f561c07735891c90aca6b371ba9ac96ed3d0a.tar.gz
gentoo-273f561c07735891c90aca6b371ba9ac96ed3d0a.tar.bz2
gentoo-273f561c07735891c90aca6b371ba9ac96ed3d0a.zip
net-misc/freerdp: fix TestUnicodeConversion on big endian machines
Closes: https://bugs.gentoo.org/806995 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/freerdp/files/freerdp-2.4.0-TestUnicodeConversion-big-endian.patch28
-rw-r--r--net-misc/freerdp/freerdp-2.3.2.ebuild1
-rw-r--r--net-misc/freerdp/freerdp-2.4.0.ebuild1
3 files changed, 30 insertions, 0 deletions
diff --git a/net-misc/freerdp/files/freerdp-2.4.0-TestUnicodeConversion-big-endian.patch b/net-misc/freerdp/files/freerdp-2.4.0-TestUnicodeConversion-big-endian.patch
new file mode 100644
index 000000000000..b8977aecd564
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-2.4.0-TestUnicodeConversion-big-endian.patch
@@ -0,0 +1,28 @@
+From 7f53e1c6c8503e9d3966c96bd403573f44879b0c Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 7 Aug 2021 21:49:12 -0400
+Subject: [PATCH] Fix TestUnicodeConversion on big endian machines
+
+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
+---
+ winpr/libwinpr/crt/test/TestUnicodeConversion.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/winpr/libwinpr/crt/test/TestUnicodeConversion.c b/winpr/libwinpr/crt/test/TestUnicodeConversion.c
+index 3bc9c245181..cc2a2597dd8 100644
+--- a/winpr/libwinpr/crt/test/TestUnicodeConversion.c
++++ b/winpr/libwinpr/crt/test/TestUnicodeConversion.c
+@@ -403,8 +403,8 @@ static BOOL test_ConvertToUnicode_wrapper(void)
+ /* Test static string buffers of differing sizes */
+ {
+ char name[] = "someteststring";
+- const WCHAR cmp[] = { L's', L'o', L'm', L'e', L't', L'e', L's', L't',
+- L's', L't', L'r', L'i', L'n', L'g', 0 };
++ const BYTE cmp[] = { 's', 0, 'o', 0, 'm', 0, 'e', 0, 't', 0, 'e', 0, 's', 0, 't', 0,
++ 's', 0, 't', 0, 'r', 0, 'i', 0, 'n', 0, 'g', 0, 0, 0 };
+ WCHAR xname[128] = { 0 };
+ LPWSTR aname = NULL;
+ LPWSTR wname = &xname[0];
diff --git a/net-misc/freerdp/freerdp-2.3.2.ebuild b/net-misc/freerdp/freerdp-2.3.2.ebuild
index 2aa7099751a7..ca45e00a93ed 100644
--- a/net-misc/freerdp/freerdp-2.3.2.ebuild
+++ b/net-misc/freerdp/freerdp-2.3.2.ebuild
@@ -90,6 +90,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/freerdp-2-openssl-3.0.patch"
+ "${FILESDIR}/freerdp-2.4.0-TestUnicodeConversion-big-endian.patch"
)
src_configure() {
diff --git a/net-misc/freerdp/freerdp-2.4.0.ebuild b/net-misc/freerdp/freerdp-2.4.0.ebuild
index c08a85f6d05a..9a213eb7db2f 100644
--- a/net-misc/freerdp/freerdp-2.4.0.ebuild
+++ b/net-misc/freerdp/freerdp-2.4.0.ebuild
@@ -90,6 +90,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/freerdp-2-openssl-3.0.patch"
+ "${FILESDIR}/freerdp-2.4.0-TestUnicodeConversion-big-endian.patch"
)
src_configure() {