summaryrefslogtreecommitdiffstats
path: root/network/opendmarc/patches/ticket227.patch
diff options
context:
space:
mode:
Diffstat (limited to 'network/opendmarc/patches/ticket227.patch')
-rw-r--r--network/opendmarc/patches/ticket227.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/network/opendmarc/patches/ticket227.patch b/network/opendmarc/patches/ticket227.patch
new file mode 100644
index 0000000000..b2786aef61
--- /dev/null
+++ b/network/opendmarc/patches/ticket227.patch
@@ -0,0 +1,40 @@
+diff --git a/libopendmarc/opendmarc_policy.c b/libopendmarc/opendmarc_policy.c
+index 36412e4..f151fda 100644
+--- a/libopendmarc/opendmarc_policy.c
++++ b/libopendmarc/opendmarc_policy.c
+@@ -1058,7 +1058,7 @@ opendmarc_policy_parse_dmarc(DMARC_POLICY_T *pctx, u_char *domain, u_char *recor
+ *yp = '\0';
+
+ xp = opendmarc_util_cleanup(xp, xbuf, sizeof xbuf);
+- if (xp != NULL || strlen((char *)xp) > 0)
++ if (xp != NULL && strlen((char *)xp) > 0)
+ {
+ /*
+ * Be generous. Accept, for example, "rf=a, aspf=afrf or any
+@@ -1100,7 +1100,7 @@ opendmarc_policy_parse_dmarc(DMARC_POLICY_T *pctx, u_char *domain, u_char *recor
+ *yp = '\0';
+
+ xp = opendmarc_util_cleanup(xp, xbuf, sizeof xbuf);
+- if (xp != NULL || strlen((char *)xp) > 0)
++ if (xp != NULL && strlen((char *)xp) > 0)
+ {
+ pctx->rua_list = opendmarc_util_pushargv(xp, pctx->rua_list,
+ &(pctx->rua_cnt));
+@@ -1132,7 +1132,7 @@ opendmarc_policy_parse_dmarc(DMARC_POLICY_T *pctx, u_char *domain, u_char *recor
+ *yp = '\0';
+
+ xp = opendmarc_util_cleanup(xp, xbuf, sizeof xbuf);
+- if (xp != NULL || strlen((char *)xp) > 0)
++ if (xp != NULL && strlen((char *)xp) > 0)
+ {
+ pctx->ruf_list = opendmarc_util_pushargv(xp, pctx->ruf_list,
+ &(pctx->ruf_cnt));
+@@ -1159,7 +1159,7 @@ opendmarc_policy_parse_dmarc(DMARC_POLICY_T *pctx, u_char *domain, u_char *recor
+ *yp = '\0';
+
+ xp = opendmarc_util_cleanup(xp, xbuf, sizeof xbuf);
+- if (xp != NULL || strlen((char *)xp) > 0)
++ if (xp != NULL && strlen((char *)xp) > 0)
+ {
+ switch ((int)*xp)
+ {