summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2019-10-07 13:17:51 -0400
committerMike Gilbert <floppym@gentoo.org>2019-10-07 13:17:51 -0400
commite800eb711b7372087af804f91c5cb14b8e7d35bf (patch)
tree12d7cb67b168af48b7f6e967a216ab89187b4555 /net-misc/freerdp/files
parentnet-misc/nextcloud-client: bump to 2.6.0 and EAPI 7 (diff)
downloadgentoo-e800eb711b7372087af804f91c5cb14b8e7d35bf.tar.gz
gentoo-e800eb711b7372087af804f91c5cb14b8e7d35bf.tar.bz2
gentoo-e800eb711b7372087af804f91c5cb14b8e7d35bf.zip
net-misc/freerdp: backport another ppc fix
Closes: https://bugs.gentoo.org/672744 Package-Manager: Portage-2.3.76_p10, Repoman-2.3.17_p62 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-misc/freerdp/files')
-rw-r--r--net-misc/freerdp/files/2.0.0-rc4-bitmap-endian.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/net-misc/freerdp/files/2.0.0-rc4-bitmap-endian.patch b/net-misc/freerdp/files/2.0.0-rc4-bitmap-endian.patch
new file mode 100644
index 000000000000..cd78ba983b7b
--- /dev/null
+++ b/net-misc/freerdp/files/2.0.0-rc4-bitmap-endian.patch
@@ -0,0 +1,30 @@
+From 18b193a1cf083b92279c3952f4f907a07cd92834 Mon Sep 17 00:00:00 2001
+From: Armin Novak <armin.novak@thincast.com>
+Date: Wed, 13 Feb 2019 09:30:34 +0100
+Subject: [PATCH] Fixed endianess issue with GETPIXEL16 and GETPIXEL32
+
+---
+ libfreerdp/codec/bitmap.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libfreerdp/codec/bitmap.c b/libfreerdp/codec/bitmap.c
+index 7524bb99ce..479c965e52 100644
+--- a/libfreerdp/codec/bitmap.c
++++ b/libfreerdp/codec/bitmap.c
+@@ -26,12 +26,14 @@
+
+ static INLINE UINT16 GETPIXEL16(const void* d, UINT32 x, UINT32 y, UINT32 w)
+ {
+- return (*(((const unsigned short*)d) + ((y) * (w) + (x))));
++ const BYTE* src = (const BYTE*)d + ((y * w + x) * sizeof(UINT16));
++ return (UINT16)(((UINT16)src[1] << 8) | (UINT16)src[0]);
+ }
+
+ static INLINE UINT32 GETPIXEL32(const void* d, UINT32 x, UINT32 y, UINT32 w)
+ {
+- return (*(((const unsigned int*)d) + ((y) * (w) + (x))));
++ const BYTE* src = (const BYTE*)d + ((y * w + x) * sizeof(UINT32));
++ return (((UINT32)src[3]) << 24) | (((UINT32)src[2]) << 16) | (((UINT32)src[1]) << 8) | (src[0] & 0xFF);
+ }
+
+ /*****************************************************************************/