+Tue Apr 25 04:50:13 1995 Chris Procenzano (proven@mit.edu)
+
+ * locate_kdc.c (krb5_locate_kdc()): Pass a NUL terminated realm
+ to profile_get_values().
+
Mon Apr 24 17:20:14 1995 Ezra Peisach <epeisach@kangaroo.mit.edu>
* locate_kdc.c (krb5_locate_kdc): Don't deref NULL pointer
u_short sec_udpport = htons(KRB5_DEFAULT_SEC_PORT);
#endif
+ if ((host = malloc(realm->length + 1)) == NULL)
+ return ENOMEM;
+
+ strncpy(host, realm->data, realm->length);
+ host[realm->length] = '\0';
hostlist = 0;
realm_kdc_names[0] = "realms";
- realm_kdc_names[1] = realm->data;
+ realm_kdc_names[1] = host;
realm_kdc_names[2] = "kdc";
realm_kdc_names[3] = 0;
code = profile_get_values(context->profile, realm_kdc_names, &hostlist);
+ krb5_xfree(host);
+
if (code == PROF_NO_SECTION)
return KRB5_REALM_UNKNOWN;
if (code == PROF_NO_RELATION)