From 7b8ae297d788b9477917a274085a2af3ddee62b2 Mon Sep 17 00:00:00 2001 From: Scott McGuire Date: Mon, 7 Feb 2000 21:36:32 +0000 Subject: [PATCH] changepw.c (krb5_locate_kpasswd): fixed memory trashing caused by incorrect pointer arithmetic when assigning DEFAULT_KPASSWD_PORT in DNS code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12019 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 32245f8c5..b50565daf 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,9 @@ +2000-02-07 Scott McGuire + + * changepw.c (krb5_locate_kpasswd): fixed memory trashing + caused by incorrect pointer arithmetic when assigning + DEFAULT_KPASSWD_PORT in DNS code also. + 2000-02-04 Scott McGuire * changepw.c (krb5_locate_kpasswd): fixed memory trashing diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c index f6bf3a920..6ed95bce7 100644 --- a/src/lib/krb5/os/changepw.c +++ b/src/lib/krb5/os/changepw.c @@ -103,7 +103,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