[arch-commits] Commit in xfce4-xkb-plugin/repos (6 files)

Evangelos Foutras foutrelis at archlinux.org
Mon Oct 15 14:42:49 UTC 2012


    Date: Monday, October 15, 2012 @ 10:42:49
  Author: foutrelis
Revision: 168753

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  xfce4-xkb-plugin/repos/extra-i686/PKGBUILD
    (from rev 168752, xfce4-xkb-plugin/trunk/PKGBUILD)
  xfce4-xkb-plugin/repos/extra-i686/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch
    (from rev 168752, xfce4-xkb-plugin/trunk/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch)
  xfce4-xkb-plugin/repos/extra-x86_64/PKGBUILD
    (from rev 168752, xfce4-xkb-plugin/trunk/PKGBUILD)
  xfce4-xkb-plugin/repos/extra-x86_64/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch
    (from rev 168752, xfce4-xkb-plugin/trunk/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch)
Deleted:
  xfce4-xkb-plugin/repos/extra-i686/PKGBUILD
  xfce4-xkb-plugin/repos/extra-x86_64/PKGBUILD

---------------------------------------------------------------------+
 extra-i686/PKGBUILD                                                 |   80 +++++-----
 extra-i686/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch   |   59 +++++++
 extra-x86_64/PKGBUILD                                               |   80 +++++-----
 extra-x86_64/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch |   59 +++++++
 4 files changed, 210 insertions(+), 68 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2012-10-15 14:42:29 UTC (rev 168752)
+++ extra-i686/PKGBUILD	2012-10-15 14:42:49 UTC (rev 168753)
@@ -1,34 +0,0 @@
-# $Id$
-# Maintainer: AndyRTR <andyrtr at archlinux.org>
-# Contributor: Tobias Kieslich <tobias (at) archlinux.org>
-
-pkgname=xfce4-xkb-plugin
-pkgver=0.5.4.3
-pkgrel=2
-pkgdesc="Plugin to switch keyboard layouts for the Xfce4 panel"
-arch=('i686' 'x86_64')
-license=('custom')
-url="http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin"
-groups=('xfce4-goodies')
-depends=('xfce4-panel' 'libxklavier>=5.0' 'librsvg')
-makedepends=('intltool')
-options=('!libtool')
-source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/${pkgver%.*.*}/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('4dc42f96dc16a3bd78f86454ea3a931464e18497')
-
-build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  ./configure --prefix=/usr \
-	--sysconfdir=/etc \
-	--libexecdir=/usr/lib \
-	--localstatedir=/var \
-	--disable-static \
-	--disable-debug
-  make
-}
-
-package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
-}

Copied: xfce4-xkb-plugin/repos/extra-i686/PKGBUILD (from rev 168752, xfce4-xkb-plugin/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2012-10-15 14:42:49 UTC (rev 168753)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: AndyRTR <andyrtr at archlinux.org>
+# Contributor: Tobias Kieslich <tobias (at) archlinux.org>
+
+pkgname=xfce4-xkb-plugin
+pkgver=0.5.4.3
+pkgrel=3
+pkgdesc="Plugin to switch keyboard layouts for the Xfce4 panel"
+arch=('i686' 'x86_64')
+url="http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin"
+license=('custom')
+groups=('xfce4-goodies')
+depends=('xfce4-panel' 'libxklavier' 'librsvg')
+makedepends=('intltool')
+options=('!libtool')
+source=(http://archive.xfce.org/src/panel-plugins/$pkgname/0.5/$pkgname-$pkgver.tar.bz2
+        xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch)
+sha256sums=('ca4801bb2edfe04eeceb71879b3cf79a0674e8311c39117efdb9d3521307396d'
+            'f5e6e5964df897045ed8c3443f632033689409459acdc54c0351264edc11b4ce')
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  # https://bugs.archlinux.org/task/31880
+  patch -Np1 -i "$srcdir/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch"
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --libexecdir=/usr/lib \
+    --localstatedir=/var \
+    --disable-static \
+    --disable-debug
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  make DESTDIR="$pkgdir" install
+
+  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: xfce4-xkb-plugin/repos/extra-i686/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch (from rev 168752, xfce4-xkb-plugin/trunk/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch)
===================================================================
--- extra-i686/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch	                        (rev 0)
+++ extra-i686/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch	2012-10-15 14:42:49 UTC (rev 168753)
@@ -0,0 +1,59 @@
+From ac73bc9de624d322b318c2eda0ace7f0bee97a64 Mon Sep 17 00:00:00 2001
+From: Igor Slepchin <igor.slepchin at gmail.com>
+Date: Thu, 19 Jul 2012 05:59:40 +0000
+Subject: Fix memory corruption.
+
+g_free(c) in the original code was freeing memory at the pointer
+that was incremented a few times since the allocation.
+
+This is similar to ubuntu bug #899290 and fedora bug 589898.
+---
+diff --git a/panel-plugin/xkb-util.c b/panel-plugin/xkb-util.c
+index d0d0230..324928f 100644
+--- a/panel-plugin/xkb-util.c
++++ b/panel-plugin/xkb-util.c
+@@ -66,11 +66,10 @@ xkb_util_get_layout_string (const gchar *group_name, const gchar *variant)
+ gchar*
+ xkb_util_normalize_group_name (const gchar* group_name)
+ {
+-    gchar *c;
++    const gchar *c;
+     gchar *result;
+     gint cut_length;
+     gint index_of_na = -1;
+-    gint index_tmp = -1;
+ 
+     if (!group_name)
+         return NULL;
+@@ -78,27 +77,19 @@ xkb_util_normalize_group_name (const gchar* group_name)
+     if (strlen (group_name) <= 3)
+         return g_strdup (group_name);
+ 
+-    c = g_strdup (group_name);
+-
+-    while (*c)
++    for (c = group_name; *c; c++)
+     {
+-        index_tmp++;
+-
+         if (!((*c >= 'a' && *c <= 'z') || (*c >= 'A' && *c <= 'Z')))
+         {
+-            index_of_na = index_tmp;
++            index_of_na = group_name - c;
+             break;
+         }
+-
+-        c++;
+     }
+ 
+     cut_length = (index_of_na != -1 && index_of_na <= 3) ? index_of_na : 3;
+ 
+     result = g_strndup (group_name, cut_length);
+ 
+-    g_free (c);
+-
+     return result;
+ }
+ 
+--
+cgit v0.9.0.3

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2012-10-15 14:42:29 UTC (rev 168752)
+++ extra-x86_64/PKGBUILD	2012-10-15 14:42:49 UTC (rev 168753)
@@ -1,34 +0,0 @@
-# $Id$
-# Maintainer: AndyRTR <andyrtr at archlinux.org>
-# Contributor: Tobias Kieslich <tobias (at) archlinux.org>
-
-pkgname=xfce4-xkb-plugin
-pkgver=0.5.4.3
-pkgrel=2
-pkgdesc="Plugin to switch keyboard layouts for the Xfce4 panel"
-arch=('i686' 'x86_64')
-license=('custom')
-url="http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin"
-groups=('xfce4-goodies')
-depends=('xfce4-panel' 'libxklavier>=5.0' 'librsvg')
-makedepends=('intltool')
-options=('!libtool')
-source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/${pkgver%.*.*}/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('4dc42f96dc16a3bd78f86454ea3a931464e18497')
-
-build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  ./configure --prefix=/usr \
-	--sysconfdir=/etc \
-	--libexecdir=/usr/lib \
-	--localstatedir=/var \
-	--disable-static \
-	--disable-debug
-  make
-}
-
-package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
-}

Copied: xfce4-xkb-plugin/repos/extra-x86_64/PKGBUILD (from rev 168752, xfce4-xkb-plugin/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2012-10-15 14:42:49 UTC (rev 168753)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: AndyRTR <andyrtr at archlinux.org>
+# Contributor: Tobias Kieslich <tobias (at) archlinux.org>
+
+pkgname=xfce4-xkb-plugin
+pkgver=0.5.4.3
+pkgrel=3
+pkgdesc="Plugin to switch keyboard layouts for the Xfce4 panel"
+arch=('i686' 'x86_64')
+url="http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin"
+license=('custom')
+groups=('xfce4-goodies')
+depends=('xfce4-panel' 'libxklavier' 'librsvg')
+makedepends=('intltool')
+options=('!libtool')
+source=(http://archive.xfce.org/src/panel-plugins/$pkgname/0.5/$pkgname-$pkgver.tar.bz2
+        xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch)
+sha256sums=('ca4801bb2edfe04eeceb71879b3cf79a0674e8311c39117efdb9d3521307396d'
+            'f5e6e5964df897045ed8c3443f632033689409459acdc54c0351264edc11b4ce')
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  # https://bugs.archlinux.org/task/31880
+  patch -Np1 -i "$srcdir/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch"
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --libexecdir=/usr/lib \
+    --localstatedir=/var \
+    --disable-static \
+    --disable-debug
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  make DESTDIR="$pkgdir" install
+
+  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: xfce4-xkb-plugin/repos/extra-x86_64/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch (from rev 168752, xfce4-xkb-plugin/trunk/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch)
===================================================================
--- extra-x86_64/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch	                        (rev 0)
+++ extra-x86_64/xfce4-xkb-plugin-0.5.4.3-2-fix-memory-corruption.patch	2012-10-15 14:42:49 UTC (rev 168753)
@@ -0,0 +1,59 @@
+From ac73bc9de624d322b318c2eda0ace7f0bee97a64 Mon Sep 17 00:00:00 2001
+From: Igor Slepchin <igor.slepchin at gmail.com>
+Date: Thu, 19 Jul 2012 05:59:40 +0000
+Subject: Fix memory corruption.
+
+g_free(c) in the original code was freeing memory at the pointer
+that was incremented a few times since the allocation.
+
+This is similar to ubuntu bug #899290 and fedora bug 589898.
+---
+diff --git a/panel-plugin/xkb-util.c b/panel-plugin/xkb-util.c
+index d0d0230..324928f 100644
+--- a/panel-plugin/xkb-util.c
++++ b/panel-plugin/xkb-util.c
+@@ -66,11 +66,10 @@ xkb_util_get_layout_string (const gchar *group_name, const gchar *variant)
+ gchar*
+ xkb_util_normalize_group_name (const gchar* group_name)
+ {
+-    gchar *c;
++    const gchar *c;
+     gchar *result;
+     gint cut_length;
+     gint index_of_na = -1;
+-    gint index_tmp = -1;
+ 
+     if (!group_name)
+         return NULL;
+@@ -78,27 +77,19 @@ xkb_util_normalize_group_name (const gchar* group_name)
+     if (strlen (group_name) <= 3)
+         return g_strdup (group_name);
+ 
+-    c = g_strdup (group_name);
+-
+-    while (*c)
++    for (c = group_name; *c; c++)
+     {
+-        index_tmp++;
+-
+         if (!((*c >= 'a' && *c <= 'z') || (*c >= 'A' && *c <= 'Z')))
+         {
+-            index_of_na = index_tmp;
++            index_of_na = group_name - c;
+             break;
+         }
+-
+-        c++;
+     }
+ 
+     cut_length = (index_of_na != -1 && index_of_na <= 3) ? index_of_na : 3;
+ 
+     result = g_strndup (group_name, cut_length);
+ 
+-    g_free (c);
+-
+     return result;
+ }
+ 
+--
+cgit v0.9.0.3




More information about the arch-commits mailing list