summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1999-02-12 04:11:11 +0000
committerTom Yu <tlyu@mit.edu>1999-02-12 04:11:11 +0000
commit5b62060b37853b9d9426478b6d3e15023bfdcdb7 (patch)
treeafe2949e85bcb75c8f578c53cc0b3d885cfe5783 /src/util
parentc805180feb548217812e9efde6e93d14284f043a (diff)
downloadkrb5-5b62060b37853b9d9426478b6d3e15023bfdcdb7.tar.gz
krb5-5b62060b37853b9d9426478b6d3e15023bfdcdb7.tar.xz
krb5-5b62060b37853b9d9426478b6d3e15023bfdcdb7.zip
* sane_hostname.c: Force maxlen to be 16 if it's less than 16,
since otherwise a numeric IP address won't fit. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11169 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r--src/util/pty/ChangeLog3
-rw-r--r--src/util/pty/sane_hostname.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog
index 11e8a5f81..454f09771 100644
--- a/src/util/pty/ChangeLog
+++ b/src/util/pty/ChangeLog
@@ -1,5 +1,8 @@
Thu Feb 11 22:24:03 1999 Tom Yu <tlyu@mit.edu>
+ * sane_hostname.c: Force maxlen to be 16 if it's less than 16,
+ since otherwise a numeric IP address won't fit.
+
* Makefile.in: Add sane_hostname.{o,c}; bump minor version.
* libpty.h: Add prototype for make_sane_hostname.
diff --git a/src/util/pty/sane_hostname.c b/src/util/pty/sane_hostname.c
index 93871d8d4..6871b3de7 100644
--- a/src/util/pty/sane_hostname.c
+++ b/src/util/pty/sane_hostname.c
@@ -51,7 +51,8 @@ pty_make_sane_hostname(struct sockaddr_in *addr,
*out = NULL;
if (maxlen && maxlen < 16)
- return -1; /* XXX */
+ /* assume they meant 16, otherwise IP addr won't fit */
+ maxlen = 16;
#ifndef NO_UT_HOST
ut_host_len = sizeof (ut.ut_host);
#else