From 071ecd58a9b69020ec170e7f89009a603e885371 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 17 Nov 2012 01:32:38 -0800 Subject: Sat Nov 17 01:27:29 PST 2012 --- extra/slim/PKGBUILD | 6 +++--- extra/slim/fix-array-overflow.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 extra/slim/fix-array-overflow.patch (limited to 'extra/slim') diff --git a/extra/slim/PKGBUILD b/extra/slim/PKGBUILD index 2b6055168..8c1872313 100644 --- a/extra/slim/PKGBUILD +++ b/extra/slim/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 169982 2012-10-30 23:00:16Z heftig $ +# $Id: PKGBUILD 171076 2012-11-16 14:05:41Z allan $ # Maintainer: Gaetan Bisson # Contributor: Thayer Williams # Contributor: Alexander Fehr @@ -21,13 +21,13 @@ source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz" 'slim.service' 'session-name.patch' 'libpng-1.4+-support.patch' - 'fix-glibc-segfault-1.3.4.patch') + 'fix-array-overflow.patch') build() { cd "${srcdir}/${pkgname}-${pkgver}" patch -p1 -i ../session-name.patch # FS#26693: fix default session name patch -Np1 -i ../libpng-1.4+-support.patch # taken from gentoo to build - patch -Np0 -i ../fix-glibc-segfault-1.3.4.patch # FS#30864 + patch -Np0 -i ../fix-array-overflow.patch # FS#30864 cd ${srcdir} mkdir build cd build diff --git a/extra/slim/fix-array-overflow.patch b/extra/slim/fix-array-overflow.patch new file mode 100644 index 000000000..b035f8a78 --- /dev/null +++ b/extra/slim/fix-array-overflow.patch @@ -0,0 +1,13 @@ +Index: app.cpp +=================================================================== +--- app.cpp (revision 223) ++++ app.cpp (working copy) +@@ -593,7 +593,7 @@ + + n++; + +- child_env = static_cast(malloc(sizeof(char*)*n)); ++ child_env = static_cast(malloc(sizeof(char*)*(n+1))); + memcpy(child_env, old_env, sizeof(char*)*n); + child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); + child_env[n] = NULL; -- cgit v1.2.3-54-g00ecf