From 75d3645758739a66f9ef37ab05a8f0f902e5cfa2842d705846a59a0b8b81ace2 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 8 Jan 2007 16:50:48 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lvm2?expand=0&rev=2 --- fix_pointer_arithmetic.diff | 11 +++++++++++ lvm2.changes | 5 +++++ lvm2.spec | 8 ++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 fix_pointer_arithmetic.diff diff --git a/fix_pointer_arithmetic.diff b/fix_pointer_arithmetic.diff new file mode 100644 index 0000000..dec1041 --- /dev/null +++ b/fix_pointer_arithmetic.diff @@ -0,0 +1,11 @@ +--- lib/device/device.c ++++ lib/device/device.c 2007/01/08 15:11:19 +@@ -72,7 +72,7 @@ + /* Check for msdos partition table */ + part_magic = buf + PART_MAGIC_OFFSET/sizeof(buf[0]); + if ((*part_magic == xlate16(PART_MAGIC))) { +- part = (struct partition *) (buf + PART_OFFSET); ++ part = (struct partition *) (((unsigned char*)buf) + PART_OFFSET); + for (p = 0; p < 4; p++, part++) { + /* Table is invalid if boot indicator not 0 or 0x80 */ + if ((part->boot_ind & 0x7f)) { diff --git a/lvm2.changes b/lvm2.changes index 0c9cbd9..9851184 100644 --- a/lvm2.changes +++ b/lvm2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 8 16:15:23 CET 2007 - fehr@suse.de + +- fix buggy pointer arithmetic (#232117) + ------------------------------------------------------------------- Mon Dec 18 10:39:49 CET 2006 - fehr@suse.de diff --git a/lvm2.spec b/lvm2.spec index eb115b2..3c3a9b5 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -1,7 +1,7 @@ # # spec file for package lvm2 (Version 2.02.17) # -# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -21,13 +21,14 @@ PreReq: %fillup_prereq %insserv_prereq %endif Autoreqprov: on Version: 2.02.17 -Release: 1 +Release: 5 Summary: LVM2 Tools Source: LVM2.%{version}.tar.bz2 Source1: lvm.conf Source2: boot.lvm Source3: sysconfig.lvm Patch: improve_probing.diff +Patch1: fix_pointer_arithmetic.diff Patch2: no-inc-audit.diff Patch3: no_buildroot_shared.diff Patch4: sys_mount_instead_linux_fs.diff @@ -44,6 +45,7 @@ Volume Manager. %prep %setup -n LVM2.%{version} %patch +%patch1 %patch2 %patch3 %patch4 @@ -176,6 +178,8 @@ install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/var/adm/fillup-templates %{_mandir}/man8/vgsplit.8.gz %changelog -n lvm2 +* Mon Jan 08 2007 - fehr@suse.de +- fix buggy pointer arithmetic (#232117) * Mon Dec 18 2006 - fehr@suse.de - update to new version 2.02.17 Add missing pvremove error message when device doesn't exist.