diff options
author | manu <manu@pkgsrc.org> | 2021-02-17 01:49:12 +0000 |
---|---|---|
committer | manu <manu@pkgsrc.org> | 2021-02-17 01:49:12 +0000 |
commit | 5b7792d0161874443f5cae0c00d79d14abcf9215 (patch) | |
tree | fa741ee6d8d4e15a5e417fa9a8edbc6d68c71355 /mail | |
parent | 8505c29873eefee0d6502f90a403b743a9b845bb (diff) | |
download | pkgsrc-5b7792d0161874443f5cae0c00d79d14abcf9215.tar.gz |
Fix two null pointer reference
Diffstat (limited to 'mail')
-rw-r--r-- | mail/opendmarc/Makefile | 4 | ||||
-rw-r--r-- | mail/opendmarc/distinfo | 4 | ||||
-rw-r--r-- | mail/opendmarc/patches/patch-opendmarc_opendmarc-arcares.c | 17 | ||||
-rw-r--r-- | mail/opendmarc/patches/patch-opendmarc_opendmarc-arcseal.c | 20 |
4 files changed, 42 insertions, 3 deletions
diff --git a/mail/opendmarc/Makefile b/mail/opendmarc/Makefile index d1494e30316..59f09913cb5 100644 --- a/mail/opendmarc/Makefile +++ b/mail/opendmarc/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.22 2020/12/24 01:10:23 manu Exp $ +# $NetBSD: Makefile,v 1.23 2021/02/17 01:49:12 manu Exp $ GITHUB_PROJECT= OpenDMARC GITHUB_TAG= rel-opendmarc-1-4-0-Beta1 DISTNAME= rel-opendmarc-1-4-0-Beta1 PKGNAME= opendmarc-1.4.0b1 -#PKGREVISION= 1 +PKGREVISION= 1 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_GITHUB:=trusteddomainproject/} DIST_SUBDIR= ${GITHUB_PROJECT} diff --git a/mail/opendmarc/distinfo b/mail/opendmarc/distinfo index 3d7efc4755c..ba291a401c6 100644 --- a/mail/opendmarc/distinfo +++ b/mail/opendmarc/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2020/12/24 01:10:23 manu Exp $ +$NetBSD: distinfo,v 1.9 2021/02/17 01:49:12 manu Exp $ SHA1 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 74ad1ef9f9a12b5fadef5919807cd55f7655d8d8 RMD160 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = e8dda5350a734509843a04329777478d9410b796 @@ -7,3 +7,5 @@ Size (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 1247386 bytes SHA1 (patch-configure.ac) = d174911e4de37d3b50b525469cbe410bb7ae119f SHA1 (patch-libopendmarc_opendmarc__dns.c) = e76ca13707677525b72609b4a5268d77efcfba84 SHA1 (patch-libopendmarc_opendmarc__spf__dns.c) = b6e1311be8e9ef44c333be57fef474f6b080a199 +SHA1 (patch-opendmarc_opendmarc-arcares.c) = 6bf207d9984341fe13120ff8d25a77ff7f6ae1e5 +SHA1 (patch-opendmarc_opendmarc-arcseal.c) = a2ace25f687736876ea4299a0177d3c3ed1e247b diff --git a/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcares.c b/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcares.c new file mode 100644 index 00000000000..0754279cbf5 --- /dev/null +++ b/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcares.c @@ -0,0 +1,17 @@ +$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) + { diff --git a/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcseal.c b/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcseal.c new file mode 100644 index 00000000000..35f560431d9 --- /dev/null +++ b/mail/opendmarc/patches/patch-opendmarc_opendmarc-arcseal.c @@ -0,0 +1,20 @@ +$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) |