summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2001-06-12 23:36:18 +0000
committeritojun <itojun@openbsd.org>2001-06-12 23:36:18 +0000
commit1b18473cda220b5d25b6c9ade3dd89f244db39de (patch)
tree1ca47ea4efc572c2fabebabcacc65fb4bf5fb016 /lib/libc
parentIn intr_findvec(), correct the for() loop bounds. (diff)
downloadwireguard-openbsd-1b18473cda220b5d25b6c9ade3dd89f244db39de.tar.xz
wireguard-openbsd-1b18473cda220b5d25b6c9ade3dd89f244db39de.zip
on openbsd, NI_MAXHOST value is different from RFC2553. PR 1870
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/getnameinfo.39
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/net/getnameinfo.3 b/lib/libc/net/getnameinfo.3
index 755e7bd4829..f5d40842470 100644
--- a/lib/libc/net/getnameinfo.3
+++ b/lib/libc/net/getnameinfo.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getnameinfo.3,v 1.11 2001/01/05 13:43:02 itojun Exp $
+.\" $OpenBSD: getnameinfo.3,v 1.12 2001/06/12 23:36:18 itojun Exp $
.\" $KAME: getnameinfo.3,v 1.20 2001/01/05 13:37:37 itojun Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
@@ -111,7 +111,7 @@ Therefore to aid the application in allocating buffers for these two
returned strings the following constants are defined in
.Aq Pa netdb.h :
.Bd -literal -offset
-#define NI_MAXHOST 1025
+#define NI_MAXHOST MAXHOSTNAMELEN
#define NI_MAXSERV 32
.Ed
.Pp
@@ -302,3 +302,8 @@ and documented in
The current implementation is not thread-safe.
.Pp
The text was shamelessly copied from RFC2553.
+.Pp
+.Ox
+intentionally uses different
+.Dv NI_MAXHOST
+value from what RFC2553 suggests, to avoid buffer length handling mistakes.