public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/freerdp] f43: Fix TestClipboardFormats failure on s390x
@ 2026-11-03 12:48 Ondrej Holy
0 siblings, 0 replies; only message in thread
From: Ondrej Holy @ 2026-11-03 12:48 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/freerdp
Branch : f43
Commit : f54c6f3a7d63bdc962aa0da4af9539fbefbdaa80
Author : Ondrej Holy <oholy@redhat.com>
Date : 2026-11-03T13:38:23+01:00
Stats : +40/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/freerdp/c/f54c6f3a7d63bdc962aa0da4af9539fbefbdaa80?branch=f43
Log:
Fix TestClipboardFormats failure on s390x
---
diff --git a/freerdp.spec b/freerdp.spec
index 45dadcc..5cb489b 100644
--- a/freerdp.spec
+++ b/freerdp.spec
@@ -44,6 +44,10 @@ URL: http://www.freerdp.com/
Source0: FreeRDP-%{version}-repack.tar.gz
Source1: freerdp_download_and_repack.sh
+# Fix TestClipboardFormats failure on s390x
+# https://github.com/FreeRDP/FreeRDP/commit/3f06a90fec8ed1bede3d2aec9c80e623c4e17f7c
+Patch: winpr-clipboard-fix-big-endian-BMP-test.patch
+
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: alsa-lib-devel
diff --git a/winpr-clipboard-fix-big-endian-BMP-test.patch b/winpr-clipboard-fix-big-endian-BMP-test.patch
new file mode 100644
index 0000000..1f90174
--- /dev/null
+++ b/winpr-clipboard-fix-big-endian-BMP-test.patch
@@ -0,0 +1,36 @@
+From 3f06a90fec8ed1bede3d2aec9c80e623c4e17f7c Mon Sep 17 00:00:00 2001
+From: Ondrej Holy <oholy@redhat.com>
+Date: Tue, 3 Nov 2026 05:25:07 +0100
+Subject: [PATCH] [winpr,clipboard] fix big-endian BMP test
+
+Currently `test_is_plain_bmp` decodes the little-endian `BITMAPINFOHEADER`
+fields with `memcpy` into host integers, so on big-endian targets it reads
+`biSize`, `biHeight` and `biCompression` byte-swapped and rejects every valid
+BMP. Let's use the endian-aware `winpr_Data_Get_UINT32` and
+`winpr_Data_Get_INT32` helpers instead.
+
+Co-Authored-By: DeepSeek V4.1 Flash <noreply@deepseek.com>
+---
+ winpr/libwinpr/clipboard/test/TestClipboardFormats.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/winpr/libwinpr/clipboard/test/TestClipboardFormats.c b/winpr/libwinpr/clipboard/test/TestClipboardFormats.c
+index e08273a05345..8b117036fb92 100644
+--- a/winpr/libwinpr/clipboard/test/TestClipboardFormats.c
++++ b/winpr/libwinpr/clipboard/test/TestClipboardFormats.c
+@@ -424,12 +424,9 @@ static BOOL test_is_plain_bmp(const BYTE* bmp, size_t size)
+ if ((size < 54) || (bmp[0] != 'B') || (bmp[1] != 'M'))
+ return FALSE;
+
+- UINT32 biSize = 0;
+- INT32 biHeight = 0;
+- UINT32 biCompression = 0;
+- memcpy(&biSize, &bmp[14], sizeof(biSize));
+- memcpy(&biHeight, &bmp[22], sizeof(biHeight));
+- memcpy(&biCompression, &bmp[30], sizeof(biCompression));
++ const UINT32 biSize = winpr_Data_Get_UINT32(&bmp[14]);
++ const INT32 biHeight = winpr_Data_Get_INT32(&bmp[22]);
++ const UINT32 biCompression = winpr_Data_Get_UINT32(&bmp[30]);
+ if ((biSize != 40) || (biHeight <= 0) || (biCompression != BI_RGB))
+ {
+ test_log("not a plain bottom-up BMP: biSize=%" PRIu32 " biHeight=%" PRId32
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 12:48 [rpms/freerdp] f43: Fix TestClipboardFormats failure on s390x Ondrej Holy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox