Wed Feb 17 01:49:12 2021 UTC ()
Fix two null pointer reference


(manu)
diff -r1.22 -r1.23 pkgsrc/mail/opendmarc/Makefile
diff -r1.8 -r1.9 pkgsrc/mail/opendmarc/distinfo
diff -r0 -r1.1 pkgsrc/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcares.c
diff -r0 -r1.1 pkgsrc/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcseal.c

cvs diff -r1.22 -r1.23 pkgsrc/mail/opendmarc/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/opendmarc/Makefile 2020/12/24 01:10:23 1.22
+++ pkgsrc/mail/opendmarc/Makefile 2021/02/17 01:49:12 1.23
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1# $NetBSD: Makefile,v 1.22 2020/12/24 01:10:23 manu Exp $ 1# $NetBSD: Makefile,v 1.23 2021/02/17 01:49:12 manu Exp $
2 2
3GITHUB_PROJECT= OpenDMARC 3GITHUB_PROJECT= OpenDMARC
4GITHUB_TAG= rel-opendmarc-1-4-0-Beta1 4GITHUB_TAG= rel-opendmarc-1-4-0-Beta1
5DISTNAME= rel-opendmarc-1-4-0-Beta1 5DISTNAME= rel-opendmarc-1-4-0-Beta1
6PKGNAME= opendmarc-1.4.0b1 6PKGNAME= opendmarc-1.4.0b1
7#PKGREVISION= 1 7PKGREVISION= 1
8CATEGORIES= mail 8CATEGORIES= mail
9MASTER_SITES= ${MASTER_SITE_GITHUB:=trusteddomainproject/} 9MASTER_SITES= ${MASTER_SITE_GITHUB:=trusteddomainproject/}
10DIST_SUBDIR= ${GITHUB_PROJECT} 10DIST_SUBDIR= ${GITHUB_PROJECT}
11 11
12MAINTAINER= pettai@NetBSD.org 12MAINTAINER= pettai@NetBSD.org
13HOMEPAGE= http://www.trusteddomain.org/opendmarc/ 13HOMEPAGE= http://www.trusteddomain.org/opendmarc/
14COMMENT= Open source DMARC library, MTA filter implementation and tools 14COMMENT= Open source DMARC library, MTA filter implementation and tools
15LICENSE= modified-bsd 15LICENSE= modified-bsd
16 16
17DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI 17DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI
18DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql 18DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql
19#DEPENDS+= {perl>=5.6.1,p5-File-Temp-[0-9]*}:../../devel/p5-File-Temp 19#DEPENDS+= {perl>=5.6.1,p5-File-Temp-[0-9]*}:../../devel/p5-File-Temp
20DEPENDS+= p5-Switch-[0-9]*:../../lang/p5-Switch 20DEPENDS+= p5-Switch-[0-9]*:../../lang/p5-Switch

cvs diff -r1.8 -r1.9 pkgsrc/mail/opendmarc/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/opendmarc/distinfo 2020/12/24 01:10:23 1.8
+++ pkgsrc/mail/opendmarc/distinfo 2021/02/17 01:49:12 1.9
@@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
1$NetBSD: distinfo,v 1.8 2020/12/24 01:10:23 manu Exp $ 1$NetBSD: distinfo,v 1.9 2021/02/17 01:49:12 manu Exp $
2 2
3SHA1 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 74ad1ef9f9a12b5fadef5919807cd55f7655d8d8 3SHA1 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 74ad1ef9f9a12b5fadef5919807cd55f7655d8d8
4RMD160 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = e8dda5350a734509843a04329777478d9410b796 4RMD160 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = e8dda5350a734509843a04329777478d9410b796
5SHA512 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = d562050da9c4b96e7707157fbbf385ab3ac551cf07754b45deb6a010b4c47e7f478dfe35bc2c8625f6553af4fbf120820bf2a9f0ce246b26cabf81e7d1174405 5SHA512 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = d562050da9c4b96e7707157fbbf385ab3ac551cf07754b45deb6a010b4c47e7f478dfe35bc2c8625f6553af4fbf120820bf2a9f0ce246b26cabf81e7d1174405
6Size (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 1247386 bytes 6Size (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 1247386 bytes
7SHA1 (patch-configure.ac) = d174911e4de37d3b50b525469cbe410bb7ae119f 7SHA1 (patch-configure.ac) = d174911e4de37d3b50b525469cbe410bb7ae119f
8SHA1 (patch-libopendmarc_opendmarc__dns.c) = e76ca13707677525b72609b4a5268d77efcfba84 8SHA1 (patch-libopendmarc_opendmarc__dns.c) = e76ca13707677525b72609b4a5268d77efcfba84
9SHA1 (patch-libopendmarc_opendmarc__spf__dns.c) = b6e1311be8e9ef44c333be57fef474f6b080a199 9SHA1 (patch-libopendmarc_opendmarc__spf__dns.c) = b6e1311be8e9ef44c333be57fef474f6b080a199
 10SHA1 (patch-opendmarc_opendmarc-arcares.c) = 6bf207d9984341fe13120ff8d25a77ff7f6ae1e5
 11SHA1 (patch-opendmarc_opendmarc-arcseal.c) = a2ace25f687736876ea4299a0177d3c3ed1e247b

File Added: pkgsrc/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcares.c
$NetBSD: patch-opendmarc_opendmarc-arcares.c,v 1.1 2021/02/17 01:49:12 manu Exp $

Avoid handling a NULL pointer when parsing a malformed header

--- opendmarc/opendmarc-arcares.c.orig	2021-02-16 16:33:34.454279528 +0000
+++ opendmarc/opendmarc-arcares.c	2021-02-16 16:35:14.240570993 +0000
@@ -324,8 +324,10 @@
 		if (*token_ptr == '\0')
 			return 0;
 		tag_label = strsep(&token_ptr, "=");
+		if (token_ptr == NULL)
+			return -1;
 		tag_value = opendmarc_arcares_strip_whitespace(token_ptr);
 		tag_code = opendmarc_arcares_convert(aar_arc_tags, tag_label);
 
 		switch (tag_code)
 		{

File Added: pkgsrc/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcseal.c
$NetBSD: patch-opendmarc_opendmarc-arcseal.c,v 1.1 2021/02/17 01:49:12 manu Exp $

Avoid handling a NULL pointer when parsing a malformed header

--- opendmarc/opendmarc-arcseal.c.orig	2021-02-16 23:42:14.132748160 +0100
+++ opendmarc/opendmarc-arcseal.c	2021-02-16 23:43:43.400895411 +0100
@@ -222,9 +222,13 @@
 		token_ptr = token + leading_space_len;
 		if (*token_ptr == '\0')
 			return 0;
 		tag_label = strsep(&token_ptr, "=");
+		if (token_ptr == NULL)
+			return -1;
 		tag_value = opendmarc_arcseal_strip_whitespace(token_ptr);
+		if (tag_value == NULL)
+			return -1;
 
 		tag_code = opendmarc_arcseal_convert(as_tags, tag_label);
 
 		switch (tag_code)