diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-08-16 04:59:44 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-08-16 04:59:44 +0000 |
commit | 24d96a8c3aa0069e27c9fba98992bb28a89ec080 (patch) | |
tree | 6ed37a9ca0a1073f66ac03b32bf27880b26df00f /sys-libs/e2fsprogs-libs | |
parent | commit latest generated version (diff) | |
download | gentoo-2-24d96a8c3aa0069e27c9fba98992bb28a89ec080.tar.gz gentoo-2-24d96a8c3aa0069e27c9fba98992bb28a89ec080.tar.bz2 gentoo-2-24d96a8c3aa0069e27c9fba98992bb28a89ec080.zip |
Add fix from upstream for NULL blkids.
(Portage version: 2.2_rc6/cvs/Linux 2.6.26.1 x86_64)
Diffstat (limited to 'sys-libs/e2fsprogs-libs')
-rw-r--r-- | sys-libs/e2fsprogs-libs/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.41.0.ebuild | 3 | ||||
-rw-r--r-- | sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.41.0-null-blkid.patch | 54 |
3 files changed, 62 insertions, 2 deletions
diff --git a/sys-libs/e2fsprogs-libs/ChangeLog b/sys-libs/e2fsprogs-libs/ChangeLog index 9528bbf01bfb..6c088a89d3a8 100644 --- a/sys-libs/e2fsprogs-libs/ChangeLog +++ b/sys-libs/e2fsprogs-libs/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/e2fsprogs-libs # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/e2fsprogs-libs/ChangeLog,v 1.1 2008/08/16 04:42:13 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/e2fsprogs-libs/ChangeLog,v 1.2 2008/08/16 04:59:44 vapier Exp $ + + 16 Aug 2008; Mike Frysinger <vapier@gentoo.org> + +files/e2fsprogs-libs-1.41.0-null-blkid.patch, + e2fsprogs-libs-1.41.0.ebuild: + Add fix from upstream for NULL blkids. *e2fsprogs-libs-1.41.0 (16 Aug 2008) diff --git a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.41.0.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.41.0.ebuild index 2562ec62f107..8f2f8aac6735 100644 --- a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.41.0.ebuild +++ b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.41.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.41.0.ebuild,v 1.1 2008/08/16 04:42:13 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.41.0.ebuild,v 1.2 2008/08/16 04:59:44 vapier Exp $ inherit eutils flag-o-matic toolchain-funcs @@ -23,6 +23,7 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${PN}-1.41.0-makefile.patch + epatch "${FILESDIR}"/${P}-null-blkid.patch } src_compile() { diff --git a/sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.41.0-null-blkid.patch b/sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.41.0-null-blkid.patch new file mode 100644 index 000000000000..e07c67c493de --- /dev/null +++ b/sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.41.0-null-blkid.patch @@ -0,0 +1,54 @@ +commit bb47c2a4aff6ec6b9be7f30cd04cf7c858a84de4 +Author: Theodore Ts'o <tytso@mit.edu> +Date: Sun Jul 13 19:10:10 2008 -0400 + + libblkid: Make sure we never reference a null dev->bid_type + + There were a few places where we don't check to make sure + dev->bid_type is non-NULL before dereferencing the pointer, mostly in + debug code. + + Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> + +diff --git a/lib/blkid/dev.c b/lib/blkid/dev.c +index 770632b..5252a8e 100644 +--- a/lib/blkid/dev.c ++++ b/lib/blkid/dev.c +@@ -34,7 +34,8 @@ void blkid_free_dev(blkid_dev dev) + return; + + DBG(DEBUG_DEV, +- printf(" freeing dev %s (%s)\n", dev->bid_name, dev->bid_type)); ++ printf(" freeing dev %s (%s)\n", dev->bid_name, dev->bid_type ? ++ dev->bid_type : "(null)")); + DBG(DEBUG_DEV, blkid_debug_dump_dev(dev)); + + list_del(&dev->bid_devs); +diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c +index df96859..65c6cca 100644 +--- a/lib/blkid/devname.c ++++ b/lib/blkid/devname.c +@@ -96,7 +96,8 @@ blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, int flags) + dev2 = list_entry(p, struct blkid_struct_dev, bid_devs); + if (dev2->bid_flags & BLKID_BID_FL_VERIFIED) + continue; +- if (strcmp(dev->bid_type, dev2->bid_type)) ++ if (!dev->bid_type || !dev2->bid_type || ++ strcmp(dev->bid_type, dev2->bid_type)) + continue; + if (dev->bid_label && dev2->bid_label && + strcmp(dev->bid_label, dev2->bid_label)) +diff --git a/lib/blkid/save.c b/lib/blkid/save.c +index 76f2f9e..60aa6ce 100644 +--- a/lib/blkid/save.c ++++ b/lib/blkid/save.c +@@ -34,7 +34,8 @@ static int save_dev(blkid_dev dev, FILE *file) + return 0; + + DBG(DEBUG_SAVE, +- printf("device %s, type %s\n", dev->bid_name, dev->bid_type)); ++ printf("device %s, type %s\n", dev->bid_name, dev->bid_type ? ++ dev->bid_type : "(null)")); + + fprintf(file, + "<device DEVNO=\"0x%04lx\" TIME=\"%ld\"", |