[arch-commits] Commit in libxcb/trunk (PKGBUILD xcb_auth-fix-memory-leak.patch)
Date: Tuesday, January 17, 2012 @ 08:00:45 Author: ibiru Revision: 146772 update to 1.8 Modified: libxcb/trunk/PKGBUILD Deleted: libxcb/trunk/xcb_auth-fix-memory-leak.patch + PKGBUILD | 34 +++--- xcb_auth-fix-memory-leak.patch | 38 -- 2 files changed, 15 insertions(+), 57 deletions(-) Modified: PKGBUILD === --- PKGBUILD2012-01-17 12:51:04 UTC (rev 146771) +++ PKGBUILD2012-01-17 13:00:45 UTC (rev 146772) @@ -3,34 +3,30 @@ # Contributor: Alexander Baldeck alexan...@archlinux.org pkgname=libxcb -pkgver=1.7 -pkgrel=2 +pkgver=1.8 +pkgrel=1 pkgdesc=X11 client-side library arch=(i686 x86_64) url=http://xcb.freedesktop.org/; -depends=('xcb-proto=1.6' 'libxdmcp' 'libxau') +depends=('xcb-proto=1.7' 'libxdmcp' 'libxau') makedepends=('pkgconfig' 'libxslt' 'python2') -conflicts=('libx111.1.99.2') options=('!libtool') license=('custom') -source=(${url}/dist/${pkgname}-${pkgver}.tar.bz2 -xcb_auth-fix-memory-leak.patch +source=($url/dist/$pkgname-$pkgver.tar.bz2 libxcb-1.1-no-pthread-stubs.patch) -sha1sums=('7540f0587907bce421914f0ddb813810cb2f36f8' - '0c9246fd2ea270bfa06cb8ef93df2f8227d83c2a' +sha1sums=('18b76759d5bbb863777f37bf3aec23ebaa31d5be' '3455e84642283bc91c8313af319002a20bbcbdf4') build() { - cd ${srcdir}/${pkgname}-${pkgver} - patch -Np1 -i ${srcdir}/libxcb-1.1-no-pthread-stubs.patch - patch -Np1 -i ${srcdir}/xcb_auth-fix-memory-leak.patch - libtoolize --force --copy - aclocal - autoconf - automake --add-missing - PYTHON=python2 ./configure --prefix=/usr --enable-xinput + cd $srcdir/$pkgname-$pkgver + patch -Np1 -i $srcdir/libxcb-1.1-no-pthread-stubs.patch + PYTHON=/usr/bin/python2 ./autogen.sh --prefix=/usr --enable-xinput make - make DESTDIR=${pkgdir} install - install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname} - install -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/ } + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install + install -m755 -d $pkgdir/usr/share/licenses/$pkgname + install -m644 COPYING $pkgdir/usr/share/licenses/$pkgname +} Deleted: xcb_auth-fix-memory-leak.patch === --- xcb_auth-fix-memory-leak.patch 2012-01-17 12:51:04 UTC (rev 146771) +++ xcb_auth-fix-memory-leak.patch 2012-01-17 13:00:45 UTC (rev 146772) @@ -1,38 +0,0 @@ -From 5755582444ad0ba79e661ab3173cc38e9e588d83 Mon Sep 17 00:00:00 2001 -From: Nick Bowler nbow...@draconx.ca -Date: Thu, 11 Nov 2010 01:49:41 + -Subject: xcb_auth: Fix memory leak in _xcb_get_auth_info. - -If the initial get_peer_sock_name(getpeername ...) succeeds, the -pointer to allocated memory is overwritten by the later call to -get_peer_sock_name(getsockname ...). Fix that up by freeing -the allocated memory before overwriting the pointer. - -Signed-off-by: Nick Bowler nbow...@draconx.ca -Signed-off-by: Julien Danjou jul...@danjou.info -diff --git a/src/xcb_auth.c b/src/xcb_auth.c -index 1af27fc..4839b78 100644 a/src/xcb_auth.c -+++ b/src/xcb_auth.c -@@ -327,10 +327,15 @@ int _xcb_get_auth_info(int fd, xcb_auth_info_t *info, int display) - if (!info-namelen) - goto no_auth; /* out of memory */ - --if (!gotsockname (sockname = get_peer_sock_name(getsockname, fd)) == NULL) -+if (!gotsockname) - { --free(info-name); --goto no_auth; /* can only authenticate sockets */ -+free(sockname); -+ -+if ((sockname = get_peer_sock_name(getsockname, fd)) == NULL) -+{ -+free(info-name); -+goto no_auth; /* can only authenticate sockets */ -+} - } - - ret = compute_auth(info, authptr, sockname); --- -cgit v0.8.3-6-g21f6
[arch-commits] Commit in libxcb/trunk (PKGBUILD xcb_auth-fix-memory-leak.patch)
Date: Wednesday, May 4, 2011 @ 04:36:03 Author: jgc Revision: 122471 upgpkg: libxcb 1.7-2 Fix memory leak (FS#23946) Added: libxcb/trunk/xcb_auth-fix-memory-leak.patch Modified: libxcb/trunk/PKGBUILD + PKGBUILD |7 +-- xcb_auth-fix-memory-leak.patch | 38 ++ 2 files changed, 43 insertions(+), 2 deletions(-) Modified: PKGBUILD === --- PKGBUILD2011-05-04 08:33:10 UTC (rev 122470) +++ PKGBUILD2011-05-04 08:36:03 UTC (rev 122471) @@ -4,7 +4,7 @@ pkgname=libxcb pkgver=1.7 -pkgrel=1 +pkgrel=2 pkgdesc=X11 client-side library arch=(i686 x86_64) url=http://xcb.freedesktop.org/; @@ -14,13 +14,16 @@ options=('!libtool') license=('custom') source=(${url}/dist/${pkgname}-${pkgver}.tar.bz2 +xcb_auth-fix-memory-leak.patch libxcb-1.1-no-pthread-stubs.patch) sha1sums=('7540f0587907bce421914f0ddb813810cb2f36f8' - '3455e84642283bc91c8313af319002a20bbcbdf4') + '0c9246fd2ea270bfa06cb8ef93df2f8227d83c2a' + '3455e84642283bc91c8313af319002a20bbcbdf4') build() { cd ${srcdir}/${pkgname}-${pkgver} patch -Np1 -i ${srcdir}/libxcb-1.1-no-pthread-stubs.patch + patch -Np1 -i ${srcdir}/xcb_auth-fix-memory-leak.patch libtoolize --force --copy aclocal autoconf Added: xcb_auth-fix-memory-leak.patch === --- xcb_auth-fix-memory-leak.patch (rev 0) +++ xcb_auth-fix-memory-leak.patch 2011-05-04 08:36:03 UTC (rev 122471) @@ -0,0 +1,38 @@ +From 5755582444ad0ba79e661ab3173cc38e9e588d83 Mon Sep 17 00:00:00 2001 +From: Nick Bowler nbow...@draconx.ca +Date: Thu, 11 Nov 2010 01:49:41 + +Subject: xcb_auth: Fix memory leak in _xcb_get_auth_info. + +If the initial get_peer_sock_name(getpeername ...) succeeds, the +pointer to allocated memory is overwritten by the later call to +get_peer_sock_name(getsockname ...). Fix that up by freeing +the allocated memory before overwriting the pointer. + +Signed-off-by: Nick Bowler nbow...@draconx.ca +Signed-off-by: Julien Danjou jul...@danjou.info +--- +diff --git a/src/xcb_auth.c b/src/xcb_auth.c +index 1af27fc..4839b78 100644 +--- a/src/xcb_auth.c b/src/xcb_auth.c +@@ -327,10 +327,15 @@ int _xcb_get_auth_info(int fd, xcb_auth_info_t *info, int display) + if (!info-namelen) + goto no_auth; /* out of memory */ + +-if (!gotsockname (sockname = get_peer_sock_name(getsockname, fd)) == NULL) ++if (!gotsockname) + { +-free(info-name); +-goto no_auth; /* can only authenticate sockets */ ++free(sockname); ++ ++if ((sockname = get_peer_sock_name(getsockname, fd)) == NULL) ++{ ++free(info-name); ++goto no_auth; /* can only authenticate sockets */ ++} + } + + ret = compute_auth(info, authptr, sockname); +-- +cgit v0.8.3-6-g21f6