summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail-filter/opendmarc/files/opendmarc-1.4.1.1-arc-seal-crash.patch38
-rw-r--r--mail-filter/opendmarc/opendmarc-1.4.1.1-r6.ebuild (renamed from mail-filter/opendmarc/opendmarc-1.4.1.1-r4.ebuild)7
2 files changed, 42 insertions, 3 deletions
diff --git a/mail-filter/opendmarc/files/opendmarc-1.4.1.1-arc-seal-crash.patch b/mail-filter/opendmarc/files/opendmarc-1.4.1.1-arc-seal-crash.patch
new file mode 100644
index 000000000000..7f96512fe45c
--- /dev/null
+++ b/mail-filter/opendmarc/files/opendmarc-1.4.1.1-arc-seal-crash.patch
@@ -0,0 +1,38 @@
+https://github.com/trusteddomainproject/OpenDMARC/issues/183
+https://bugs.gentoo.org/900521
+
+--- a/opendmarc/opendmarc-arcseal.h 2021-04-30 17:34:43.000000000 +0100
++++ b/opendmarc/opendmarc-arcseal.h 2021-06-25 14:23:01.725593770 +0100
+@@ -32,7 +32,7 @@
+ /* max header tag value length (short) */
+ #define OPENDMARC_ARCSEAL_MAX_SHORT_VALUE_LEN 256
+ /* max header tag value length (long) */
+-#define OPENDMARC_ARCSEAL_MAX_LONG_VALUE_LEN 512
++#define OPENDMARC_ARCSEAL_MAX_LONG_VALUE_LEN 768
+
+ /* names and field labels */
+ #define OPENDMARC_ARCSEAL_HDRNAME "ARC-Seal"
+--- a/opendmarc/opendmarc-arcseal.c 2021-04-30 17:34:43.000000000 +0100
++++ b/opendmarc/opendmarc-arcseal.c 2021-06-25 14:27:10.689908703 +0100
+@@ -29,7 +29,7 @@
+ #include "opendmarc.h"
+
+ #define OPENDMARC_ARCSEAL_MAX_FIELD_NAME_LEN 255
+-#define OPENDMARC_ARCSEAL_MAX_TOKEN_LEN 512
++#define OPENDMARC_ARCSEAL_MAX_TOKEN_LEN 768
+
+ /* tables */
+ struct opendmarc_arcseal_lookup
+@@ -167,7 +167,12 @@ opendmarc_arcseal_parse(u_char *hdr, str
+ if (*token_ptr == '\0')
+ return 0;
+ tag_label = strsep(&token_ptr, "=");
++ if (token_ptr == NULL)
++ return 0;
++
+ tag_value = opendmarc_arcseal_strip_whitespace(token_ptr);
++ if (tag_value == NULL)
++ return 0;
+
+ tag_code = opendmarc_arcseal_convert(as_tags, tag_label);
+
diff --git a/mail-filter/opendmarc/opendmarc-1.4.1.1-r4.ebuild b/mail-filter/opendmarc/opendmarc-1.4.1.1-r6.ebuild
index e0d08ea8755b..27b732ba2fb5 100644
--- a/mail-filter/opendmarc/opendmarc-1.4.1.1-r4.ebuild
+++ b/mail-filter/opendmarc/opendmarc-1.4.1.1-r6.ebuild
@@ -12,11 +12,11 @@ S="${WORKDIR}/OpenDMARC-rel-${PN}-${PV//./-}"
LICENSE="BSD"
SLOT="0/3" # 1.4 has API breakage with 1.3, yet uses same soname
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="spf +reports"
-DEPEND="reports? ( dev-perl/DBI )
- || ( mail-filter/libmilter mail-mta/sendmail )"
+DEPEND="mail-filter/libmilter:=
+ reports? ( dev-perl/DBI )"
RDEPEND="${DEPEND}
acct-user/opendmarc
reports? (
@@ -29,6 +29,7 @@ RDEPEND="${DEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-1.4.1.1-CVE-2021-34555.patch
"${FILESDIR}"/${PN}-1.4.1.1-underlinking.patch
+ "${FILESDIR}"/${PN}-1.4.1.1-arc-seal-crash.patch
)
src_prepare() {