aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-12-04 13:00:31 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2020-12-04 13:01:57 +0100
commit90c7db4435fa080aaef04e866627c908da68f3ff (patch)
tree03fa54da771b8d4739c9d285054c64eb41d09485
parentb1b094310c29b8f00187f76d3306b3d848c5fedb (diff)
downloadaports-90c7db4435fa080aaef04e866627c908da68f3ff.tar.gz
aports-90c7db4435fa080aaef04e866627c908da68f3ff.tar.bz2
aports-90c7db4435fa080aaef04e866627c908da68f3ff.tar.xz
main/parted: fix segfault in bsd_probe
fixes #12161 upstream report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45026
-rw-r--r--main/parted/APKBUILD6
-rw-r--r--main/parted/fix-buffer-overflow.patch16
2 files changed, 20 insertions, 2 deletions
diff --git a/main/parted/APKBUILD b/main/parted/APKBUILD
index cb34522b1b..b58e7c564c 100644
--- a/main/parted/APKBUILD
+++ b/main/parted/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=parted
pkgver=3.3
-pkgrel=0
+pkgrel=1
pkgdesc="Utility to create, destroy, resize, check and copy partitions"
url="https://www.gnu.org/software/parted/parted.html"
arch="all"
@@ -15,6 +15,7 @@ source="https://ftp.gnu.org/gnu/parted/parted-$pkgver.tar.xz
parted-include-sysmacros.patch
make-tests.patch
skip-duplicate-bsd-test-on-s390x.patch
+ fix-buffer-overflow.patch
"
build() {
@@ -43,4 +44,5 @@ sha512sums="d1384694a491aa53bab6206fdeccd1d192de2ed379fe25aa865dd6aa06ed945a728e
444a7e2fb3235dfd218f6b71fb25adde107d001f638d988ee1fa79686d8efee94a9499e27bdfdd75f9718760b448938b70a90a74285b93a39338d21f4ab4c9dc fix-libintl-header-s390x.patch
ba86cd2591d8e920e474faf28a32f9eaca9482e168c53eae5d392276aefaf6c46b66a0d5fc4a18b7186bf38f7288bd79de8ba8019c1cd38a5e2102904ce75723 parted-include-sysmacros.patch
a8995b87f1bb1c9c357fc4729a17b629291f918df2b65548789d41537af5c3972238b2ad65d845738bd76f8b63673d075227c0de0bbf7f7f061cc36adec0c19d make-tests.patch
-d19ad61cffb6434f1433c2da29dc6c137076125ddd23936ca26298db5d120dc8ec64788556599a1a8522d10630bca48258d7dfa9fd633551b791275bdc2c68d0 skip-duplicate-bsd-test-on-s390x.patch"
+d19ad61cffb6434f1433c2da29dc6c137076125ddd23936ca26298db5d120dc8ec64788556599a1a8522d10630bca48258d7dfa9fd633551b791275bdc2c68d0 skip-duplicate-bsd-test-on-s390x.patch
+475b9ad3790e08ed2a0baec2f62fa48b549b935d4f642c08fb3312fd580765e5020fef54ae13a21a71e41b84f212230480399b758a48be37e657d7f934018491 fix-buffer-overflow.patch"
diff --git a/main/parted/fix-buffer-overflow.patch b/main/parted/fix-buffer-overflow.patch
new file mode 100644
index 0000000000..724c08b195
--- /dev/null
+++ b/main/parted/fix-buffer-overflow.patch
@@ -0,0 +1,16 @@
+bug: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12161
+upstream report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45026
+
+diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c
+index 8483641..0a2b891 100644
+--- a/libparted/labels/bsd.c
++++ b/libparted/labels/bsd.c
+@@ -164,8 +164,6 @@ bsd_probe (const PedDevice *dev)
+
+ label = &((BSDDiskData*) s0)->label;
+
+- alpha_bootblock_checksum(label);
+-
+ /* check magic */
+ bool found = PED_LE32_TO_CPU (label->d_magic) == BSD_DISKMAGIC;
+ free (s0);