main/parted: fix segfault in bsd_probe

fixes #12161
upstream report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45026
This commit is contained in:
Natanael Copa 2020-12-04 13:00:31 +01:00
parent b1b094310c
commit 90c7db4435
2 changed files with 20 additions and 2 deletions

View File

@ -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"

View File

@ -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);