From 186174369a30cdb114dd600b6606d56895598a4c Mon Sep 17 00:00:00 2001 From: Scott McGuire Date: Fri, 4 Feb 2000 22:41:21 +0000 Subject: [PATCH] (krb5_locate_kpasswd): fixed memory trashing caused by incorrect pointer arithmetic when assigning DEFAULT_KPASSWD_PORT in non-DNS code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11997 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 6 ++++++ src/lib/krb5/os/changepw.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index a990ab26e..32245f8c5 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,9 @@ +2000-02-04 Scott McGuire + + * changepw.c (krb5_locate_kpasswd): fixed memory trashing + caused by incorrect pointer arithmetic when assigning + DEFAULT_KPASSWD_PORT in non-DNS code. + 1999-12-03 Danilo Almeida * changepw.c: Define ETIMEDOUT for Windows. diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c index 84dcfc5e1..f6bf3a920 100644 --- a/src/lib/krb5/os/changepw.c +++ b/src/lib/krb5/os/changepw.c @@ -82,7 +82,7 @@ krb5_locate_kpasswd(context, realm, addr_pp, naddrs, master_index, nmasters) /* success with admin_server but now we need to change the port */ /* number to use DEFAULT_KPASSWD_PORT. */ for ( i=0;i<*naddrs;i++ ) { - struct sockaddr_in *sin = (struct sockaddr_in *) &addr_pp[i]; + struct sockaddr_in *sin = (struct sockaddr_in *) addr_pp[i]; sin->sin_port = htons(DEFAULT_KPASSWD_PORT); } } -- 2.26.2