summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-06-06 21:34:32 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2018-06-06 21:34:32 +0200
commitbb9877be458c77cf14db97dd0fef7452f8720170 (patch)
tree739be02c3f4c3fe7af7963f08d0ef805ab535580 /extra
parentc26c58e5d9d27dceac79e646905195923c3f8461 (diff)
downloadpackages-bb9877be458c77cf14db97dd0fef7452f8720170.tar.xz
extra/icewm: fixed segfaults on startup (initPixmap null refs)
Diffstat (limited to 'extra')
-rw-r--r--extra/icewm/PKGBUILD12
-rw-r--r--extra/icewm/icewm-1.3.8-pixmap-null-ref.patch33
2 files changed, 45 insertions, 0 deletions
diff --git a/extra/icewm/PKGBUILD b/extra/icewm/PKGBUILD
index af9cda66..847dbece 100644
--- a/extra/icewm/PKGBUILD
+++ b/extra/icewm/PKGBUILD
@@ -1,3 +1,4 @@
+# compilation issues with narrowing -1 initializations
source+=('icewm-1.3.8-narrowing-casts.patch')
sha1sums+=('d8a296356884a3318f2436c035425e22bf94f15c')
@@ -7,3 +8,14 @@ eval "$(
/remain_power.patch/a patch -Np1 -i ${srcdir}/icewm-1.3.8-narrowing-casts.patch
'
)"
+
+# segfaults when derefenecing null refs in initializePixmaps
+source+=('icewm-1.3.8-pixmap-null-ref.patch')
+sha1sums+=('9e13e6bbf10e31427e048b4c0b516f37b0b9ff59')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ /narrowing-casts.patch/a patch -Np1 -i ${srcdir}/icewm-1.3.8-pixmap-null-ref.patch
+ '
+)"
diff --git a/extra/icewm/icewm-1.3.8-pixmap-null-ref.patch b/extra/icewm/icewm-1.3.8-pixmap-null-ref.patch
new file mode 100644
index 00000000..bd8b5664
--- /dev/null
+++ b/extra/icewm/icewm-1.3.8-pixmap-null-ref.patch
@@ -0,0 +1,33 @@
+diff -rauN icewm-1.3.8/src/wmapp.cc icewm-1.3.8-pixmap-null-ref-patch/src/wmapp.cc
+--- icewm-1.3.8/src/wmapp.cc 2013-11-17 17:54:39.000000000 +0100
++++ icewm-1.3.8-pixmap-null-ref-patch/src/wmapp.cc 2018-06-06 21:30:29.778296503 +0200
+@@ -188,7 +188,6 @@
+ _XA_NET_CLOSE_WINDOW,
+ _XA_NET_WM_STRUT,
+ _XA_NET_WM_STRUT_PARTIAL,
+- _XA_NET_WORKAREA,
+ _XA_NET_WM_STATE,
+ _XA_NET_WM_STATE_MAXIMIZED_VERT,
+ _XA_NET_WM_STATE_MAXIMIZED_HORZ,
+@@ -621,14 +620,14 @@
+
+ for (int a = 0; a <= 1; a++) {
+ for (int b = 0; b <= 1; b++) {
+- frameT[a][b]->replicate(true, copyMask);
+- frameB[a][b]->replicate(true, copyMask);
+- frameL[a][b]->replicate(false, copyMask);
+- frameR[a][b]->replicate(false, copyMask);
++ if( frameT[a][b] != null ) frameT[a][b]->replicate(true, copyMask);
++ if( frameB[a][b] != null ) frameB[a][b]->replicate(true, copyMask);
++ if( frameL[a][b] != null ) frameL[a][b]->replicate(false, copyMask);
++ if( frameR[a][b] != null ) frameR[a][b]->replicate(false, copyMask);
+ }
+- titleS[a]->replicate(true, copyMask);
+- titleT[a]->replicate(true, copyMask);
+- titleB[a]->replicate(true, copyMask);
++ if( titleS[a] != null ) titleS[a]->replicate(true, copyMask);
++ if( titleT[a] != null ) titleT[a]->replicate(true, copyMask);
++ if( titleB[a] != null ) titleB[a]->replicate(true, copyMask);
+ }
+
+ menuButton[0] = paths->loadPixmap(0, "menuButtonI.xpm");