summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Miller <alex.miller@gmx.de>2021-03-22 15:51:10 +0100
committerJoonas Niilola <juippis@gentoo.org>2021-03-26 08:44:21 +0200
commitce727418b3384636b59ead4086330e7bd2415925 (patch)
tree496792eaa9dd0e54633ee756f004e02c5839ae89 /x11-misc
parentx11-misc/rss-glx: Workaround hanging processes (diff)
downloadgentoo-ce727418b3384636b59ead4086330e7bd2415925.tar.gz
gentoo-ce727418b3384636b59ead4086330e7bd2415925.tar.bz2
gentoo-ce727418b3384636b59ead4086330e7bd2415925.zip
x11-misc/rss-glx: Fix matrixview segmentation faults with USE=-bzip2
Patch by Edward Sheldrake taken from the linked sourceforge bug. https://sourceforge.net/p/rss-glx/bugs/12/ Signed-off-by: Alexander Miller <alex.miller@gmx.de> Closes: https://github.com/gentoo/gentoo/pull/20061 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/rss-glx/files/rss-glx-0.9.1-matrixview-copy-font.patch27
-rw-r--r--x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild1
2 files changed, 28 insertions, 0 deletions
diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-matrixview-copy-font.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-matrixview-copy-font.patch
new file mode 100644
index 000000000000..cb9f5e9a500c
--- /dev/null
+++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-matrixview-copy-font.patch
@@ -0,0 +1,27 @@
+--- a/src/matrixview.c
++++ b/src/matrixview.c
+@@ -537,7 +537,12 @@ void load_texture ()
+ {
+ long a;
+
++#ifdef HAVE_LIBBZ2
+ LOAD_TEXTURE (font, cfont, cfont_compressedsize, cfont_size)
++#else
++ font = (unsigned char*) malloc (cfont_size);
++ memcpy (font, cfont, cfont_size);
++#endif
+
+ for (a = 0; a < 131072; a++) {
+ if ((a >> 9) & 2)
+@@ -579,7 +584,11 @@ void ourBuildTextures ()
+ exit (-1);
+ }
+
++#ifdef HAVE_LIBBZ2
+ FREE_TEXTURE (font)
++#else
++ free (font);
++#endif
+
+ glBindTexture (GL_TEXTURE_2D, 3);
+
diff --git a/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild b/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
index 7dba5284904c..1af7c945fa98 100644
--- a/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
+++ b/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
@@ -41,6 +41,7 @@ PATCHES=(
"${FILESDIR}"/${P}-imagemagick-7.patch
"${FILESDIR}"/${P}-c++11-narrowing.patch
"${FILESDIR}"/${P}-hang.patch
+ "${FILESDIR}"/${P}-matrixview-copy-font.patch
)
src_prepare() {