[arch-commits] Commit in parted/repos (6 files)

2017-10-06 Thread Christian Hesse
Date: Friday, October 6, 2017 @ 19:12:30
  Author: eworm
Revision: 307060

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  parted/repos/testing-i686/
  parted/repos/testing-i686/PKGBUILD
(from rev 307059, parted/trunk/PKGBUILD)
  parted/repos/testing-i686/parted-735669-fat16-crash-v1.patch
(from rev 307059, parted/trunk/parted-735669-fat16-crash-v1.patch)
  parted/repos/testing-x86_64/
  parted/repos/testing-x86_64/PKGBUILD
(from rev 307059, parted/trunk/PKGBUILD)
  parted/repos/testing-x86_64/parted-735669-fat16-crash-v1.patch
(from rev 307059, parted/trunk/parted-735669-fat16-crash-v1.patch)

---+
 testing-i686/PKGBUILD |   41 
 testing-i686/parted-735669-fat16-crash-v1.patch   |  193 
 testing-x86_64/PKGBUILD   |   41 
 testing-x86_64/parted-735669-fat16-crash-v1.patch |  193 
 4 files changed, 468 insertions(+)

Copied: parted/repos/testing-i686/PKGBUILD (from rev 307059, 
parted/trunk/PKGBUILD)
===
--- testing-i686/PKGBUILD   (rev 0)
+++ testing-i686/PKGBUILD   2017-10-06 19:12:30 UTC (rev 307060)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Giovanni Scafora 
+# Contributor: Aaron Griffin 
+
+pkgname=parted
+pkgver=3.2
+pkgrel=6
+pkgdesc="A program for creating, destroying, resizing, checking and copying 
partitions"
+arch=('i686' 'x86_64')
+license=('GPL3')
+url="http://www.gnu.org/software/parted/parted.html;
+depends=('device-mapper')
+makedepends=('pkg-config')
+validpgpkeys=('1B49F933916A37A3F45A1812015F4DD4A70FB705') # Phillip Susi 

+source=("https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.sig}
+'parted-735669-fat16-crash-v1.patch')
+sha256sums=('858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4'
+'SKIP'
+'3cbf31765b1653609a4c95687b91e34dd57ad3498d5d02019c966bd46d25d100')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  patch -Np1 -i "${srcdir}/parted-735669-fat16-crash-v1.patch"
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  ./configure --prefix=/usr \
+  --sbindir=/usr/bin \
+  --disable-debug \
+  --disable-rpath
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make DESTDIR="${pkgdir}" install
+}

Copied: parted/repos/testing-i686/parted-735669-fat16-crash-v1.patch (from rev 
307059, parted/trunk/parted-735669-fat16-crash-v1.patch)
===
--- testing-i686/parted-735669-fat16-crash-v1.patch 
(rev 0)
+++ testing-i686/parted-735669-fat16-crash-v1.patch 2017-10-06 19:12:30 UTC 
(rev 307060)
@@ -0,0 +1,193 @@
+From 3a4c152d38ce34481b0f4fda8aea4e71a8280d8f Mon Sep 17 00:00:00 2001
+From: Mike Fleetwood 
+Date: Sat, 27 Sep 2014 10:23:17 +0100
+Subject: [PATCH 1/3] lib-fs-resize: Prevent crash resizing FAT16 file systems
+
+Resizing FAT16 file system crashes in libparted/fs/r/fat/resize.c
+create_resize_context() because it was dereferencing NULL pointer
+fs_info->info_sector to copy the info_sector.
+
+Only FAT32 file systems have info_sector populated by fat_open() ->
+fat_info_sector_read().  FAT12 and FAT16 file systems don't have an
+info_sector so pointer fs_info->info_sector remains assigned NULL from
+fat_alloc().  When resizing a FAT file system create_resize_context()
+was always dereferencing fs_info->info_sector to memory copy the
+info_sector, hence it crashed for FAT12 and FAT16.
+
+Make create_resize_context() only copy the info_sector for FAT32 file
+systems.
+
+Reported by Christian Hesse in
+https://bugzilla.gnome.org/show_bug.cgi?id=735669
+---
+ NEWS|4 
+ libparted/fs/r/fat/resize.c |   12 +---
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index 297b0a5..da7db50 100644
+--- a/NEWS
 b/NEWS
+@@ -2,6 +2,10 @@ GNU parted NEWS-*- 
outline -*-
+ 
+ * Noteworthy changes in release ?.? (-??-??) [?]
+ 
++** Bug Fixes
++
++  libparted-fs-resize: Prevent crash resizing FAT16 file systems.
++
+ 
+ * Noteworthy changes in release 3.2 (2014-07-28) [stable]
+ 
+diff --git a/libparted/fs/r/fat/resize.c b/libparted/fs/r/fat/resize.c
+index 919acf0..bfe60a0 100644
+--- a/libparted/fs/r/fat/resize.c
 b/libparted/fs/r/fat/resize.c
+@@ -668,11 +668,17 @@ create_resize_context (PedFileSystem* fs, const 
PedGeometry* new_geom)
+ 
+ /* preserve boot code, etc. */
+   new_fs_info->boot_sector = ped_malloc (new_geom->dev->sector_size);
+-  new_fs_info->info_sector = ped_malloc (new_geom->dev->sector_size);
+   memcpy (new_fs_info->boot_sector, fs_info->boot_sector,
+ 

[arch-commits] Commit in parted/repos (6 files)

2016-11-06 Thread Evangelos Foutras
Date: Monday, November 7, 2016 @ 00:30:20
  Author: foutrelis
Revision: 279991

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  parted/repos/staging-i686/
  parted/repos/staging-i686/PKGBUILD
(from rev 279990, parted/trunk/PKGBUILD)
  parted/repos/staging-i686/parted-735669-fat16-crash-v1.patch
(from rev 279990, parted/trunk/parted-735669-fat16-crash-v1.patch)
  parted/repos/staging-x86_64/
  parted/repos/staging-x86_64/PKGBUILD
(from rev 279990, parted/trunk/PKGBUILD)
  parted/repos/staging-x86_64/parted-735669-fat16-crash-v1.patch
(from rev 279990, parted/trunk/parted-735669-fat16-crash-v1.patch)

---+
 staging-i686/PKGBUILD |   39 
 staging-i686/parted-735669-fat16-crash-v1.patch   |  193 
 staging-x86_64/PKGBUILD   |   39 
 staging-x86_64/parted-735669-fat16-crash-v1.patch |  193 
 4 files changed, 464 insertions(+)

Copied: parted/repos/staging-i686/PKGBUILD (from rev 279990, 
parted/trunk/PKGBUILD)
===
--- staging-i686/PKGBUILD   (rev 0)
+++ staging-i686/PKGBUILD   2016-11-07 00:30:20 UTC (rev 279991)
@@ -0,0 +1,39 @@
+# $Id$
+# Maintainer: Giovanni Scafora 
+# Contributor: Aaron Griffin 
+
+pkgname=parted
+pkgver=3.2
+pkgrel=5
+pkgdesc="A program for creating, destroying, resizing, checking and copying 
partitions"
+arch=('i686' 'x86_64')
+license=('GPL3')
+url="http://www.gnu.org/software/parted/parted.html;
+depends=('device-mapper')
+makedepends=('pkg-config')
+source=("http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz;
+'parted-735669-fat16-crash-v1.patch')
+md5sums=('0247b6a7b314f8edeb618159fa95f9cb'
+ '15a72be3860b9ec754dc7bff17a5afae')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  patch -Np1 -i "${srcdir}/parted-735669-fat16-crash-v1.patch"
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  ./configure --prefix=/usr \
+  --sbindir=/usr/bin \
+  --disable-debug \
+  --disable-rpath
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make DESTDIR="${pkgdir}" install
+}

Copied: parted/repos/staging-i686/parted-735669-fat16-crash-v1.patch (from rev 
279990, parted/trunk/parted-735669-fat16-crash-v1.patch)
===
--- staging-i686/parted-735669-fat16-crash-v1.patch 
(rev 0)
+++ staging-i686/parted-735669-fat16-crash-v1.patch 2016-11-07 00:30:20 UTC 
(rev 279991)
@@ -0,0 +1,193 @@
+From 3a4c152d38ce34481b0f4fda8aea4e71a8280d8f Mon Sep 17 00:00:00 2001
+From: Mike Fleetwood 
+Date: Sat, 27 Sep 2014 10:23:17 +0100
+Subject: [PATCH 1/3] lib-fs-resize: Prevent crash resizing FAT16 file systems
+
+Resizing FAT16 file system crashes in libparted/fs/r/fat/resize.c
+create_resize_context() because it was dereferencing NULL pointer
+fs_info->info_sector to copy the info_sector.
+
+Only FAT32 file systems have info_sector populated by fat_open() ->
+fat_info_sector_read().  FAT12 and FAT16 file systems don't have an
+info_sector so pointer fs_info->info_sector remains assigned NULL from
+fat_alloc().  When resizing a FAT file system create_resize_context()
+was always dereferencing fs_info->info_sector to memory copy the
+info_sector, hence it crashed for FAT12 and FAT16.
+
+Make create_resize_context() only copy the info_sector for FAT32 file
+systems.
+
+Reported by Christian Hesse in
+https://bugzilla.gnome.org/show_bug.cgi?id=735669
+---
+ NEWS|4 
+ libparted/fs/r/fat/resize.c |   12 +---
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index 297b0a5..da7db50 100644
+--- a/NEWS
 b/NEWS
+@@ -2,6 +2,10 @@ GNU parted NEWS-*- 
outline -*-
+ 
+ * Noteworthy changes in release ?.? (-??-??) [?]
+ 
++** Bug Fixes
++
++  libparted-fs-resize: Prevent crash resizing FAT16 file systems.
++
+ 
+ * Noteworthy changes in release 3.2 (2014-07-28) [stable]
+ 
+diff --git a/libparted/fs/r/fat/resize.c b/libparted/fs/r/fat/resize.c
+index 919acf0..bfe60a0 100644
+--- a/libparted/fs/r/fat/resize.c
 b/libparted/fs/r/fat/resize.c
+@@ -668,11 +668,17 @@ create_resize_context (PedFileSystem* fs, const 
PedGeometry* new_geom)
+ 
+ /* preserve boot code, etc. */
+   new_fs_info->boot_sector = ped_malloc (new_geom->dev->sector_size);
+-  new_fs_info->info_sector = ped_malloc (new_geom->dev->sector_size);
+   memcpy (new_fs_info->boot_sector, fs_info->boot_sector,
+   new_geom->dev->sector_size);
+-  memcpy (new_fs_info->info_sector, fs_info->info_sector,
+-  new_geom->dev->sector_size);
++  new_fs_info->info_sector = NULL;