diff --git a/parted-1.8.8-avoid-none-stat.patch b/parted-1.8.8-avoid-none-stat.patch new file mode 100644 index 0000000..e379d2b --- /dev/null +++ b/parted-1.8.8-avoid-none-stat.patch @@ -0,0 +1,13 @@ +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 83e24c8..8734ab7 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -2107,6 +2107,8 @@ _mount_table_search (const char* file_name, dev_t dev) + return 0; + while (fgets (line, 512, file)) { + junk = sscanf (line, "%s", part_name); ++ if (part_name[0] != '/') ++ continue; + if (stat (part_name, &part_stat) == 0) { + if (part_stat.st_rdev == dev) { + fclose (file); diff --git a/parted.spec b/parted.spec index 1b1f1fd..24e244e 100644 --- a/parted.spec +++ b/parted.spec @@ -4,7 +4,7 @@ Summary: The GNU disk partition manipulation program Name: parted Version: 1.8.8 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv3+ Group: Applications/System URL: http://www.gnu.org/software/parted @@ -21,6 +21,7 @@ Patch7: %{name}-1.8.8-dospartrec.patch Patch8: %{name}-1.8.8-appletv.patch Patch9: %{name}-1.8.8-s390-compile.patch Patch10: %{name}-1.8.8-sparc-enableraid.patch +Patch11: %{name}-1.8.8-avoid-none-stat.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: e2fsprogs-devel @@ -68,6 +69,7 @@ Parted library, you need to install this package. %patch8 -p1 -b .appletv %patch9 -p1 -b .s390-compile %patch10 -p1 -b .sparc-raid +%patch11 -p1 -b .avoid-none-stat %build %configure --enable-device-mapper --enable-selinux --disable-static @@ -125,6 +127,9 @@ fi %{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc %changelog +* Thu Jan 22 2009 Joel Granados - 1.8.8.-12 +- Avoid the calling of stat for strings that don't begin with the "/" char (#353191). + * Sat Dec 13 2008 Tom "spot" Callaway - 1.8.8-11 - fix typo in last patch