Fix two null pointer referencediff -r1.22 -r1.23 pkgsrc/mail/opendmarc/Makefile
(manu)
@@ -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 | |||
3 | GITHUB_PROJECT= OpenDMARC | 3 | GITHUB_PROJECT= OpenDMARC | |
4 | GITHUB_TAG= rel-opendmarc-1-4-0-Beta1 | 4 | GITHUB_TAG= rel-opendmarc-1-4-0-Beta1 | |
5 | DISTNAME= rel-opendmarc-1-4-0-Beta1 | 5 | DISTNAME= rel-opendmarc-1-4-0-Beta1 | |
6 | PKGNAME= opendmarc-1.4.0b1 | 6 | PKGNAME= opendmarc-1.4.0b1 | |
7 | #PKGREVISION= 1 | 7 | PKGREVISION= 1 | |
8 | CATEGORIES= mail | 8 | CATEGORIES= mail | |
9 | MASTER_SITES= ${MASTER_SITE_GITHUB:=trusteddomainproject/} | 9 | MASTER_SITES= ${MASTER_SITE_GITHUB:=trusteddomainproject/} | |
10 | DIST_SUBDIR= ${GITHUB_PROJECT} | 10 | DIST_SUBDIR= ${GITHUB_PROJECT} | |
11 | 11 | |||
12 | MAINTAINER= pettai@NetBSD.org | 12 | MAINTAINER= pettai@NetBSD.org | |
13 | HOMEPAGE= http://www.trusteddomain.org/opendmarc/ | 13 | HOMEPAGE= http://www.trusteddomain.org/opendmarc/ | |
14 | COMMENT= Open source DMARC library, MTA filter implementation and tools | 14 | COMMENT= Open source DMARC library, MTA filter implementation and tools | |
15 | LICENSE= modified-bsd | 15 | LICENSE= modified-bsd | |
16 | 16 | |||
17 | DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI | 17 | DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI | |
18 | DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql | 18 | DEPENDS+= 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 | |
20 | DEPENDS+= p5-Switch-[0-9]*:../../lang/p5-Switch | 20 | DEPENDS+= p5-Switch-[0-9]*:../../lang/p5-Switch |
@@ -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 | |||
3 | SHA1 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 74ad1ef9f9a12b5fadef5919807cd55f7655d8d8 | 3 | SHA1 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 74ad1ef9f9a12b5fadef5919807cd55f7655d8d8 | |
4 | RMD160 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = e8dda5350a734509843a04329777478d9410b796 | 4 | RMD160 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = e8dda5350a734509843a04329777478d9410b796 | |
5 | SHA512 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = d562050da9c4b96e7707157fbbf385ab3ac551cf07754b45deb6a010b4c47e7f478dfe35bc2c8625f6553af4fbf120820bf2a9f0ce246b26cabf81e7d1174405 | 5 | SHA512 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = d562050da9c4b96e7707157fbbf385ab3ac551cf07754b45deb6a010b4c47e7f478dfe35bc2c8625f6553af4fbf120820bf2a9f0ce246b26cabf81e7d1174405 | |
6 | Size (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 1247386 bytes | 6 | Size (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 1247386 bytes | |
7 | SHA1 (patch-configure.ac) = d174911e4de37d3b50b525469cbe410bb7ae119f | 7 | SHA1 (patch-configure.ac) = d174911e4de37d3b50b525469cbe410bb7ae119f | |
8 | SHA1 (patch-libopendmarc_opendmarc__dns.c) = e76ca13707677525b72609b4a5268d77efcfba84 | 8 | SHA1 (patch-libopendmarc_opendmarc__dns.c) = e76ca13707677525b72609b4a5268d77efcfba84 | |
9 | SHA1 (patch-libopendmarc_opendmarc__spf__dns.c) = b6e1311be8e9ef44c333be57fef474f6b080a199 | 9 | SHA1 (patch-libopendmarc_opendmarc__spf__dns.c) = b6e1311be8e9ef44c333be57fef474f6b080a199 | |
10 | SHA1 (patch-opendmarc_opendmarc-arcares.c) = 6bf207d9984341fe13120ff8d25a77ff7f6ae1e5 | |||
11 | SHA1 (patch-opendmarc_opendmarc-arcseal.c) = a2ace25f687736876ea4299a0177d3c3ed1e247b |
$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)
{
$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)