summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/os/hst_realm.c
diff options
context:
space:
mode:
authorZhanna Tsitkov <tsitkova@mit.edu>2009-01-12 19:40:37 +0000
committerZhanna Tsitkov <tsitkova@mit.edu>2009-01-12 19:40:37 +0000
commit713800910a278e8fedfd093991ccbed78420165c (patch)
tree851ad8aa35584a2a7df284edcb5130c64c6f3f5c /src/lib/krb5/os/hst_realm.c
parent529e72785f09c36a9aa34fd7f3fc30fb41a1c92e (diff)
downloadkrb5-713800910a278e8fedfd093991ccbed78420165c.tar.gz
krb5-713800910a278e8fedfd093991ccbed78420165c.tar.xz
krb5-713800910a278e8fedfd093991ccbed78420165c.zip
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
Diffstat (limited to 'src/lib/krb5/os/hst_realm.c')
-rw-r--r--src/lib/krb5/os/hst_realm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/krb5/os/hst_realm.c b/src/lib/krb5/os/hst_realm.c
index 36c0e48608..fda0dfde2c 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.<hostname> TXT record in DNS. This