public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Holy <oholy@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/freerdp] f43: Fix TestClipboardFormats failure on s390x
Date: Tue, 03 Nov 2026 12:48:34 GMT	[thread overview]
Message-ID: <179371011474.1.13304047953552855823.rpms-freerdp-f54c6f3a7d63@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-11-03 12:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179371011474.1.13304047953552855823.rpms-freerdp-f54c6f3a7d63@fedoraproject.org \
    --to=oholy@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox