From: Danilo Almeida Date: Fri, 6 Aug 1999 16:07:04 +0000 (+0000) Subject: * def_realm.c (krb5_get_default_realm): Check that we have X-Git-Tag: krb5-1.2-beta1~313 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af39a232860d29d39bcd8c4859c05aa1a03e5506;p=krb5.git * def_realm.c (krb5_get_default_realm): Check that we have a realm before trying to copy it (since profile_get_string may return no error but not get anything). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11629 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 4ebcecbfa..3c4d885a1 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,5 +1,9 @@ 1999-08-06 Danilo Almeida + * def_realm.c (krb5_get_default_realm): Check that we have + a realm before trying to copy it (since profile_get_string + may return no error but not get anything). + * init_os_ctx.c (krb5_get_profile): Fix calling convention. 1999-08-05 Danilo Almeida diff --git a/src/lib/krb5/os/def_realm.c b/src/lib/krb5/os/def_realm.c index 44a4e9381..262b77922 100644 --- a/src/lib/krb5/os/def_realm.c +++ b/src/lib/krb5/os/def_realm.c @@ -76,7 +76,7 @@ krb5_get_default_realm(context, lrealm) "default_realm", 0, 0, &realm); - if (!retval) { + if (!retval && realm) { context->default_realm = malloc(strlen(realm) + 1); if (!context->default_realm) { profile_release_string(realm);