From eb24deea49e34672728532ba95ffd5c91be260d9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Aug 28 2009 10:36:11 +0000 Subject: - volkey is only 4 chars, don't overflow destination buffer with 84 chars --- diff --git a/parted-1.9.0-volkeysize.patch b/parted-1.9.0-volkeysize.patch new file mode 100644 index 0000000..b39e49c --- /dev/null +++ b/parted-1.9.0-volkeysize.patch @@ -0,0 +1,12 @@ +diff -up parted-1.9.0/libparted/labels/vtoc.c.kh1 parted-1.9.0/libparted/labels/vtoc.c +--- parted-1.9.0/libparted/labels/vtoc.c.kh1 2009-08-28 12:17:26.000000000 +0200 ++++ parted-1.9.0/libparted/labels/vtoc.c 2009-08-28 12:18:03.000000000 +0200 +@@ -263,7 +263,7 @@ vtoc_volume_label_init (volume_label_t * + PDEBUG + sprintf(buffer, "%84s", " "); + vtoc_ebcdic_enc(buffer, buffer, 84); +- strncpy(vlabel->volkey, buffer, 84); ++ strncpy(vlabel->volkey, buffer, 4); + } + + /* diff --git a/parted.spec b/parted.spec index 6e16abb..f4538f6 100644 --- a/parted.spec +++ b/parted.spec @@ -4,7 +4,7 @@ Summary: The GNU disk partition manipulation program Name: parted Version: 1.9.0 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv3+ Group: Applications/System URL: http://www.gnu.org/software/parted @@ -21,6 +21,7 @@ Patch8: %{name}-1.9.0-dasd-duplicate.patch Patch9: %{name}-1.9.0-new-duplicate.patch Patch10: %{name}-1.9.0-handle-dup-error.patch Patch11: %{name}-1.9.0-swap-flag.patch +Patch12: %{name}-1.9.0-volkeysize.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: e2fsprogs-devel @@ -69,6 +70,7 @@ Parted library, you need to install this package. %patch9 -p1 -b .new-duplicate %patch10 -p1 -b .handle-dup-error %patch11 -p1 -b .swap-flag +%patch12 -p1 -b .volkey-size^^ %build @@ -129,6 +131,9 @@ fi %{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc %changelog +* Fri Aug 28 2009 Karsten Hopp 1.9.0-13 +- volkey is only 4 chars, don't overflow destination buffer with 84 chars + * Fri Aug 21 2009 Joel Granados - 1.9.0-12 - libuuid-devel is now valid for s390 builds.