summaryrefslogtreecommitdiffstats
path: root/source/x/x11/patch/xorg-server/0001-render-Fix-build-with-gcc-12.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2022-07-13 19:56:59 +0000
committer Eric Hameleers <alien@slackware.com>2022-07-14 09:00:16 +0200
commit8db980621c64bad4de1a42f9c5d110eef12758b8 (patch)
tree2e89d361204a545b9abcdb5a7035c8ca4a9cabde /source/x/x11/patch/xorg-server/0001-render-Fix-build-with-gcc-12.patch
parentbee3d6c81b37e0eb578c0aaf4dca8202b62ab3c0 (diff)
downloadcurrent-8db980621c64bad4de1a42f9c5d110eef12758b8.tar.gz
current-8db980621c64bad4de1a42f9c5d110eef12758b8.tar.xz
Wed Jul 13 19:56:59 UTC 202220220713195659
a/inih-56-x86_64-1.txz: Upgraded. a/kernel-firmware-20220710_dfa2931-noarch-1.txz: Upgraded. a/kernel-generic-5.18.11-x86_64-1.txz: Upgraded. a/kernel-huge-5.18.11-x86_64-1.txz: Upgraded. a/kernel-modules-5.18.11-x86_64-1.txz: Upgraded. ap/mpg123-1.30.1-x86_64-1.txz: Upgraded. d/git-2.37.1-x86_64-1.txz: Upgraded. d/kernel-headers-5.18.11-x86-1.txz: Upgraded. d/mercurial-6.2-x86_64-1.txz: Upgraded. k/kernel-source-5.18.11-noarch-1.txz: Upgraded. kde/bluedevil-5.25.3-x86_64-1.txz: Upgraded. kde/breeze-5.25.3-x86_64-1.txz: Upgraded. kde/breeze-grub-5.25.3-x86_64-1.txz: Upgraded. kde/breeze-gtk-5.25.3-x86_64-1.txz: Upgraded. kde/drkonqi-5.25.3-x86_64-1.txz: Upgraded. kde/kactivitymanagerd-5.25.3-x86_64-1.txz: Upgraded. kde/kde-cli-tools-5.25.3-x86_64-1.txz: Upgraded. kde/kde-gtk-config-5.25.3-x86_64-1.txz: Upgraded. kde/kdecoration-5.25.3-x86_64-1.txz: Upgraded. kde/kdeplasma-addons-5.25.3-x86_64-1.txz: Upgraded. kde/kgamma5-5.25.3-x86_64-1.txz: Upgraded. kde/khotkeys-5.25.3-x86_64-1.txz: Upgraded. kde/kinfocenter-5.25.3-x86_64-1.txz: Upgraded. kde/kmenuedit-5.25.3-x86_64-1.txz: Upgraded. kde/kscreen-5.25.3-x86_64-1.txz: Upgraded. kde/kscreenlocker-5.25.3-x86_64-1.txz: Upgraded. kde/ksshaskpass-5.25.3-x86_64-1.txz: Upgraded. kde/ksystemstats-5.25.3-x86_64-1.txz: Upgraded. kde/kwallet-pam-5.25.3-x86_64-1.txz: Upgraded. kde/kwayland-integration-5.25.3-x86_64-1.txz: Upgraded. kde/kwin-5.25.3-x86_64-1.txz: Upgraded. kde/kwrited-5.25.3-x86_64-1.txz: Upgraded. kde/layer-shell-qt-5.25.3-x86_64-1.txz: Upgraded. kde/libkscreen-5.25.3-x86_64-1.txz: Upgraded. kde/libksysguard-5.25.3-x86_64-1.txz: Upgraded. kde/milou-5.25.3-x86_64-1.txz: Upgraded. kde/oxygen-5.25.3-x86_64-1.txz: Upgraded. kde/oxygen-sounds-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-browser-integration-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-desktop-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-disks-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-firewall-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-integration-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-nm-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-pa-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-sdk-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-systemmonitor-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-vault-5.25.3-x86_64-1.txz: Upgraded. kde/plasma-workspace-5.25.3.1-x86_64-1.txz: Upgraded. kde/plasma-workspace-wallpapers-5.25.3-x86_64-1.txz: Upgraded. kde/polkit-kde-agent-1-5.25.3-x86_64-1.txz: Upgraded. kde/powerdevil-5.25.3-x86_64-1.txz: Upgraded. kde/qqc2-breeze-style-5.25.3-x86_64-1.txz: Upgraded. kde/sddm-kcm-5.25.3-x86_64-1.txz: Upgraded. kde/systemsettings-5.25.3-x86_64-1.txz: Upgraded. kde/xdg-desktop-portal-kde-5.25.3-x86_64-1.txz: Upgraded. l/SDL2_mixer-2.6.1-x86_64-1.txz: Upgraded. l/gtk4-4.6.6-x86_64-2.txz: Rebuilt. Drop embedded pango library and use "unshare -n" to prevent the issue from happening again. l/libuv-1.44.2-x86_64-1.txz: Upgraded. l/pango-1.50.8-x86_64-1.txz: Upgraded. l/pipewire-0.3.55-x86_64-1.txz: Upgraded. x/font-util-1.3.3-x86_64-1.txz: Upgraded. x/xorg-server-1.20.14-x86_64-4.txz: Rebuilt. xkb: switch to array index loops to moving pointers. xkb: add request length validation for XkbSetGeometry. xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck. For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-2319 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-2320 (* Security fix *) x/xorg-server-xephyr-1.20.14-x86_64-4.txz: Rebuilt. x/xorg-server-xnest-1.20.14-x86_64-4.txz: Rebuilt. x/xorg-server-xvfb-1.20.14-x86_64-4.txz: Rebuilt. xap/mozilla-thunderbird-102.0.2-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/thunderbird/102.0.2/releasenotes/ xfce/xfce4-settings-4.16.3-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/x/x11/patch/xorg-server/0001-render-Fix-build-with-gcc-12.patch')
-rw-r--r--source/x/x11/patch/xorg-server/0001-render-Fix-build-with-gcc-12.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/source/x/x11/patch/xorg-server/0001-render-Fix-build-with-gcc-12.patch b/source/x/x11/patch/xorg-server/0001-render-Fix-build-with-gcc-12.patch
new file mode 100644
index 000000000..22f2e5a72
--- /dev/null
+++ b/source/x/x11/patch/xorg-server/0001-render-Fix-build-with-gcc-12.patch
@@ -0,0 +1,90 @@
+From 53173fdab492f0f638f6616fcf01af0b9ea6338d Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Thu, 20 Jan 2022 10:20:38 +0100
+Subject: [PATCH xserver] render: Fix build with gcc 12
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The xserver fails to compile with the latest gcc 12:
+
+ render/picture.c: In function ‘CreateSolidPicture’:
+ render/picture.c:874:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds]
+ 874 | pPicture->pSourcePict->type = SourcePictTypeSolidFill;
+ | ^~
+ render/picture.c:868:45: note: object of size 16 allocated by ‘malloc’
+ 868 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ render/picture.c: In function ‘CreateLinearGradientPicture’:
+ render/picture.c:906:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds]
+ 906 | pPicture->pSourcePict->linear.type = SourcePictTypeLinear;
+ | ^~
+ render/picture.c:899:45: note: object of size 32 allocated by ‘malloc’
+ 899 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ render/picture.c: In function ‘CreateConicalGradientPicture’:
+ render/picture.c:989:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds]
+ 989 | pPicture->pSourcePict->conical.type = SourcePictTypeConical;
+ | ^~
+ render/picture.c:982:45: note: object of size 32 allocated by ‘malloc’
+ 982 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ cc1: some warnings being treated as errors
+ ninja: build stopped: subcommand failed.
+
+This is because gcc 12 has become stricter and raises a warning now.
+
+Fix the warning/error by allocating enough memory to store the union
+struct.
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1256
+(cherry picked from commit c6b0dcb82d4db07a2f32c09a8c09c85a5f57248e)
+---
+ render/picture.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/render/picture.c b/render/picture.c
+index afa0d258f..2be4b1954 100644
+--- a/render/picture.c
++++ b/render/picture.c
+@@ -865,7 +865,7 @@ CreateSolidPicture(Picture pid, xRenderColor * color, int *error)
+ }
+
+ pPicture->id = pid;
+- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill));
++ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
+ if (!pPicture->pSourcePict) {
+ *error = BadAlloc;
+ free(pPicture);
+@@ -896,7 +896,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2,
+ }
+
+ pPicture->id = pid;
+- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient));
++ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
+ if (!pPicture->pSourcePict) {
+ *error = BadAlloc;
+ free(pPicture);
+@@ -936,7 +936,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner,
+ }
+
+ pPicture->id = pid;
+- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictRadialGradient));
++ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
+ if (!pPicture->pSourcePict) {
+ *error = BadAlloc;
+ free(pPicture);
+@@ -979,7 +979,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle,
+ }
+
+ pPicture->id = pid;
+- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient));
++ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
+ if (!pPicture->pSourcePict) {
+ *error = BadAlloc;
+ free(pPicture);
+--
+2.34.1
+