diff options
author | Christian Weisgerber <naddy@FreeBSD.org> | 2017-08-11 19:51:28 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@FreeBSD.org> | 2017-08-11 19:51:28 +0000 |
commit | 314ed8e624772fab75ec5f7e4151ad8b502c16ea (patch) | |
tree | 8c1f76b6bfb8f5855af9cdcec66af6bf563be7e0 /net | |
parent | cba2760d64c7979c20d60e27aa0078426cc12b67 (diff) | |
download | ports-314ed8e624772fab75ec5f7e4151ad8b502c16ea.tar.gz ports-314ed8e624772fab75ec5f7e4151ad8b502c16ea.zip |
Notes
Diffstat (limited to 'net')
-rw-r--r-- | net/openntpd/Makefile | 1 | ||||
-rw-r--r-- | net/openntpd/files/patch-src_parse.y | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/net/openntpd/Makefile b/net/openntpd/Makefile index cb7cf2644bb1..fc01766f601a 100644 --- a/net/openntpd/Makefile +++ b/net/openntpd/Makefile @@ -2,6 +2,7 @@ PORTNAME= openntpd PORTVERSION= 6.2p1 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= OPENBSD/OpenNTPD diff --git a/net/openntpd/files/patch-src_parse.y b/net/openntpd/files/patch-src_parse.y new file mode 100644 index 000000000000..0f1a3b912131 --- /dev/null +++ b/net/openntpd/files/patch-src_parse.y @@ -0,0 +1,23 @@ +--- src/parse.y.orig 2017-08-11 19:19:57 UTC ++++ src/parse.y +@@ -136,6 +136,8 @@ main : LISTEN ON address listen_opts { + struct sockaddr_in sin4; + struct sockaddr_in6 sin6; + ++ memset(&sin4, 0, sizeof(sin4)); ++ memset(&sin6, 0, sizeof(sin6)); + sin4.sin_family = AF_INET; + sin6.sin6_family = AF_INET6; + #ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN +@@ -144,9 +146,9 @@ main : LISTEN ON address listen_opts { + #endif + + if (inet_pton(AF_INET, $3, &sin4.sin_addr) == 1) +- memcpy(&query_addr4, &sin4, sizeof(struct in_addr)); ++ memcpy(&query_addr4, &sin4, sizeof(struct sockaddr_in)); + else if (inet_pton(AF_INET6, $3, &sin6.sin6_addr) == 1) +- memcpy(&query_addr6, &sin6, sizeof(struct in6_addr)); ++ memcpy(&query_addr6, &sin6, sizeof(struct sockaddr_in6)); + else { + yyerror("invalid IPv4 or IPv6 address: %s\n", + $3); |