git: e6b99be61e8c - main - mail/opendmarc: Fix crash on FreeBSD >= 14.1

From: Norikatsu Shigemura <nork_at_FreeBSD.org>
Date: Thu, 08 Aug 2024 05:06:39 UTC
The branch main has been updated by nork:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e6b99be61e8c429e9a2e1e20b6da40e643889630

commit e6b99be61e8c429e9a2e1e20b6da40e643889630
Author:     Yasuhito FUTATSUKI <freebsd-bug-report-yf@yf.bsdclub.org>
AuthorDate: 2024-08-08 05:05:22 +0000
Commit:     Norikatsu Shigemura <nork@FreeBSD.org>
CommitDate: 2024-08-08 05:05:22 +0000

    mail/opendmarc: Fix crash on FreeBSD >= 14.1
    
    PR:             279780
    Obtained from:  https://github.com/trusteddomainproject/OpenDMARC/issues/245
    Tested by:      leres, John R <gamer@ryppn.com>
    Approved by:    hrs (mentor), maintainer timeout (6 weeks)
---
 mail/opendmarc/Makefile                                  |  2 +-
 mail/opendmarc/files/patch-libopendmarc_opendmarc__dns.c | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/mail/opendmarc/Makefile b/mail/opendmarc/Makefile
index e7636444a181..078c9b8d52ef 100644
--- a/mail/opendmarc/Makefile
+++ b/mail/opendmarc/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	opendmarc
 PORTVERSION=	1.4.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail security
 MASTER_SITES=	GH
 
diff --git a/mail/opendmarc/files/patch-libopendmarc_opendmarc__dns.c b/mail/opendmarc/files/patch-libopendmarc_opendmarc__dns.c
new file mode 100644
index 000000000000..5d11d7205f97
--- /dev/null
+++ b/mail/opendmarc/files/patch-libopendmarc_opendmarc__dns.c
@@ -0,0 +1,10 @@
+--- libopendmarc/opendmarc_dns.c.orig	2021-12-20 06:40:37 UTC
++++ libopendmarc/opendmarc_dns.c
+@@ -203,6 +203,7 @@ dmarc_dns_get_record(char *domain, int *reply, char *g
+ 		++bp;
+ 
+ #ifdef HAVE_RES_NINIT   
++	memset(&resp, '\0', sizeof resp);
+ 	res_ninit(&resp);
+ #ifdef RES_USE_DNSSEC
+ 	resp.options |= RES_USE_DNSSEC;