(krb5_sendto_kdc): advance colon so that we actually parse the port

number.  based on a patch from Leif Johansson <leifj@it.su.se>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7722 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-01-06 07:59:11 +00:00
parent e2e63ad12b
commit f8e43718e9

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997 - 2000 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -346,7 +346,7 @@ krb5_sendto_kdc (krb5_context context,
}
colon = strchr (p, ':');
if (colon)
*colon = '\0';
*colon++ = '\0';
memset (&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
@@ -357,8 +357,6 @@ krb5_sendto_kdc (krb5_context context,
snprintf (portstr, sizeof(portstr), "%d",
ntohs(init_port (colon, port)));
ret = getaddrinfo (p, portstr, &hints, &ai);
if (colon)
*colon++ = ':';
if (ret)
continue;
for (a = ai; a != NULL; a = a->ai_next) {