From f8e43718e94be6f95a1d08091b5e19e97d107ea6 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Thu, 6 Jan 2000 07:59:11 +0000 Subject: [PATCH] (krb5_sendto_kdc): advance colon so that we actually parse the port number. based on a patch from Leif Johansson git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7722 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/send_to_kdc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/krb5/send_to_kdc.c b/lib/krb5/send_to_kdc.c index 9bbfc17b7..17bf08969 100644 --- a/lib/krb5/send_to_kdc.c +++ b/lib/krb5/send_to_kdc.c @@ -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) {