From 713800910a278e8fedfd093991ccbed78420165c Mon Sep 17 00:00:00 2001 From: Zhanna Tsitkov Date: Mon, 12 Jan 2009 19:40:37 +0000 Subject: [PATCH] Check the return code from krb5int_clean_hostname as the sanity verification of the hostname might fail git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21724 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/hst_realm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/krb5/os/hst_realm.c b/src/lib/krb5/os/hst_realm.c index 36c0e4860..fda0dfde2 100644 --- a/src/lib/krb5/os/hst_realm.c +++ b/src/lib/krb5/os/hst_realm.c @@ -1,7 +1,7 @@ /* * lib/krb5/os/hst_realm.c * - * Copyright 1990,1991,2002 by the Massachusetts Institute of Technology. + * Copyright 1990,1991,2002,2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -208,7 +208,9 @@ krb5_get_host_realm(krb5_context context, const char *host, char ***realmsp) printf("get_host_realm(host:%s) called\n",host); #endif - krb5int_clean_hostname(context, host, local_host, sizeof local_host); + retval = krb5int_clean_hostname(context, host, local_host, sizeof local_host); + if (retval) + return retval; /* Search for the best match for the host or domain. @@ -350,7 +352,9 @@ krb5_get_fallback_host_realm(krb5_context context, krb5_data *hdata, char ***rea printf("get_fallback_host_realm(host >%s<) called\n",host); #endif - krb5int_clean_hostname(context, host, local_host, sizeof local_host); + retval = krb5int_clean_hostname(context, host, local_host, sizeof local_host); + if (retval) + return retval; /* * Try looking up a _kerberos. TXT record in DNS. This -- 2.26.2