summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Yantarev2022-05-29 16:34:34 +0300
committerDenis Yantarev2022-05-29 16:34:34 +0300
commitea1c8bcb87dcb1bb99e6a93a97c528e1fe214eeb (patch)
treef5396f6e287869def35afacf794fbbae35029562
parent75b25c400420787962b98e5dc2fbc06dd6f9f40f (diff)
downloadaur-ea1c8bcb87dcb1bb99e6a93a97c528e1fe214eeb.tar.gz
Applied signal 11 patch from FreeBSD ports
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD5
-rw-r--r--ad_open.patch84
3 files changed, 91 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e32cb1fc5bb2..3e0ce3381fa1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = netatalk
pkgdesc = Open-source implementation of the Apple Filing Protocol
pkgver = 3.1.13
- pkgrel = 2
+ pkgrel = 3
url = https://netatalk.sourceforge.net
install = netatalk.install
arch = i686
@@ -25,8 +25,10 @@ pkgbase = netatalk
backup = etc/afp.conf
backup = etc/extmap.conf
source = http://downloads.sourceforge.net/project/netatalk/netatalk/3.1.13/netatalk-3.1.13.tar.bz2
+ source = ad_open.patch
source = python3.patch
md5sums = 697421623c32ee0ab9c8076191766e5f
+ md5sums = 69525b38032baefbaa705f68f93c1d31
md5sums = 8a81f88e01bcb4225e39e667b01dc1c6
pkgname = netatalk
diff --git a/PKGBUILD b/PKGBUILD
index f1a2090ed584..84f7517f0be3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=netatalk
pkgver=3.1.13
-pkgrel=2
+pkgrel=3
pkgdesc='Open-source implementation of the Apple Filing Protocol'
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url='https://netatalk.sourceforge.net'
@@ -18,12 +18,15 @@ backup=('etc/afp.conf'
'etc/extmap.conf')
install=$pkgname.install
source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2
+ ad_open.patch
python3.patch)
md5sums=('697421623c32ee0ab9c8076191766e5f'
+ '69525b38032baefbaa705f68f93c1d31'
'8a81f88e01bcb4225e39e667b01dc1c6')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
+ patch -p0 < "$srcdir/ad_open.patch"
patch -p0 < "$srcdir/python3.patch"
}
diff --git a/ad_open.patch b/ad_open.patch
new file mode 100644
index 000000000000..9a704469a6de
--- /dev/null
+++ b/ad_open.patch
@@ -0,0 +1,84 @@
+--- libatalk/adouble/ad_open.c.orig 2022-03-22 04:44:25 UTC
++++ libatalk/adouble/ad_open.c
+@@ -1574,6 +1574,8 @@ static bool ad_entry_check_size(uint32_t eid,
+ uint32_t required_len;
+
+ if (eid >= ADEID_MAX) {
++ LOG(log_error, logtype_ad, "ad_entry_check_size %d is greater than %d",
++ eid, ADEID_MAX);
+ return false;
+ }
+ if (got_len == 0) {
+@@ -1585,6 +1587,7 @@ static bool ad_entry_check_size(uint32_t eid,
+ * Shouldn't happen: implicitly initialized to zero because
+ * explicit initializer missing.
+ */
++ LOG(log_error, logtype_ad, "ad_entry_check_size explicit initializer missing");
+ return false;
+ }
+ if (ad_checks[eid].expected_len == -1) {
+@@ -1594,6 +1597,8 @@ static bool ad_entry_check_size(uint32_t eid,
+ if (ad_checks[eid].fixed_size) {
+ if (ad_checks[eid].expected_len != got_len) {
+ /* Wrong size fo fixed size entry. */
++ LOG(log_error, logtype_ad, "ad_entry_check_size wrong size to fixed size entry (%d != %d)",
++ ad_checks[eid].expected_len, got_len);
+ return false;
+ }
+ required_len = got_len;
+@@ -1604,12 +1609,16 @@ static bool ad_entry_check_size(uint32_t eid,
+ * Too small for variable sized entry with
+ * minimum size.
+ */
++ LOG(log_error, logtype_ad, "ad_entry_check_size too small for variable sized entry (%d < %d)",
++ got_len, ad_checks[eid].expected_len);
+ return false;
+ }
+ required_len = got_len;
+ } else {
+ if (got_len > ad_checks[eid].expected_len) {
+ /* Too big for variable sized entry. */
++ LOG(log_error, logtype_ad, "ad_entry_check_size too big for variable sized entry (%d > %d)",
++ got_len, ad_checks[eid].expected_len);
+ return false;
+ }
+ /*
+@@ -1621,10 +1630,14 @@ static bool ad_entry_check_size(uint32_t eid,
+ }
+ if (off + required_len < off) {
+ /* wrap around */
++ LOG(log_error, logtype_ad, "ad_entry_check_size wrap around (%d + %d < %d)",
++ off, required_len, off);
+ return false;
+ }
+ if (off + required_len > bufsize) {
+ /* overflow */
++ LOG(log_error, logtype_ad, "ad_entry_check_size overflow (%d + %d > %d)",
++ off, required_len, bufsize);
+ return false;
+ }
+ return true;
+@@ -1637,14 +1650,21 @@ void *ad_entry(const struct adouble *ad, int eid)
+ size_t len = ad_getentrylen(ad, eid);
+ bool valid;
+
++ if (bufsize == 0) {
++ bufsize = sizeof(ad->ad_data) - (off + len);
++ }
++
+ valid = ad_entry_check_size(eid, bufsize, off, len);
+ if (!valid) {
++ LOG(log_error, logtype_ad, "ad_entry: not valid");
+ return NULL;
+ }
+
+- if (off == 0 || len == 0) {
++ /*if (off == 0 || len == 0) {
++ LOG(log_error, logtype_ad, "ad_entry: off or len is 0 (off: %d, len: %d)",
++ off, len);
+ return NULL;
+- }
++ }*/
+
+ return ((struct adouble *)ad)->ad_data + off;
+ }