aboutsummaryrefslogtreecommitdiffstats
path: root/security/stunnel
diff options
context:
space:
mode:
authorroam <roam@FreeBSD.org>2004-12-30 22:22:10 +0800
committerroam <roam@FreeBSD.org>2004-12-30 22:22:10 +0800
commit5c210b9048a1e7f93d387388e5b812c65d7bd6be (patch)
tree991e67c71a0ecc7cd9272e1349d1896b95cb1950 /security/stunnel
parent318131ad8c65045983899077e9ec3e093a25fa55 (diff)
downloadfreebsd-ports-gnome-5c210b9048a1e7f93d387388e5b812c65d7bd6be.tar.gz
freebsd-ports-gnome-5c210b9048a1e7f93d387388e5b812c65d7bd6be.tar.zst
freebsd-ports-gnome-5c210b9048a1e7f93d387388e5b812c65d7bd6be.zip
Fix a getnameinfo() out-of-memory error caused by passing a 20-character
buffer to hold a numeric IPv4/v6 address. Of course, IPv6 addresses may be a bit longer than 20 characters :) A-ha! moment during: discussion with the stunnel author
Diffstat (limited to 'security/stunnel')
-rw-r--r--security/stunnel/Makefile1
-rw-r--r--security/stunnel/files/patch-src::network.c10
2 files changed, 7 insertions, 4 deletions
diff --git a/security/stunnel/Makefile b/security/stunnel/Makefile
index c11091df467b..26c91fff863f 100644
--- a/security/stunnel/Makefile
+++ b/security/stunnel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= stunnel
PORTVERSION= 4.06
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.stunnel.org/download/stunnel/src/ \
ftp://stunnel.mirt.net/stunnel/OBSOLETE/ \
diff --git a/security/stunnel/files/patch-src::network.c b/security/stunnel/files/patch-src::network.c
index 799222470d3d..c95c293ad6a2 100644
--- a/security/stunnel/files/patch-src::network.c
+++ b/security/stunnel/files/patch-src::network.c
@@ -1,5 +1,5 @@
--- src/network.c.orig Thu Oct 14 18:03:49 2004
-+++ src/network.c Wed Dec 29 14:16:06 2004
++++ src/network.c Thu Dec 30 16:12:16 2004
@@ -125,7 +125,7 @@
int retval;
@@ -22,17 +22,19 @@
case EAI_FAMILY:
return "ai_family not supported (EAI_FAMILY)";
case EAI_SOCKTYPE:
-@@ -562,10 +566,13 @@
+@@ -561,11 +565,14 @@
+
/* getnameinfo() version */
char *s_ntop(char *text, SOCKADDR_UNION *addr) {
- char host[20], port[6];
+- char host[20], port[6];
++ char host[IPLEN], port[6];
+ int err;
- if(getnameinfo(&addr->sa, addr_len(*addr),
- host, 20, port, 6, NI_NUMERICHOST|NI_NUMERICSERV)) {
- sockerror("getnameinfo");
+ err = getnameinfo(&addr->sa, addr_len(*addr),
-+ host, 20, port, 6, NI_NUMERICHOST|NI_NUMERICSERV);
++ host, IPLEN, port, 6, NI_NUMERICHOST|NI_NUMERICSERV);
+ if (err) {
+ s_log(LOG_ERR, "Error resolving the specified address: %s",
+ s_gai_strerror(err));