svn rev #21724: trunk/src/lib/krb5/os/

tsitkova@MIT.EDU tsitkova at MIT.EDU
Mon Jan 12 14:40:37 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=21724
Commit By: tsitkova
Log Message:
Check the return code from krb5int_clean_hostname as the  sanity verification of the hostname might fail.




Changed Files:
U   trunk/src/lib/krb5/os/hst_realm.c
Modified: trunk/src/lib/krb5/os/hst_realm.c
===================================================================
--- trunk/src/lib/krb5/os/hst_realm.c	2009-01-12 18:29:42 UTC (rev 21723)
+++ trunk/src/lib/krb5/os/hst_realm.c	2009-01-12 19:40:37 UTC (rev 21724)
@@ -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 @@
     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 @@
     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




More information about the cvs-krb5 mailing list