Fixed minor bug where the length of the returned domain was calculated
authorTheodore Tso <tytso@mit.edu>
Mon, 19 Dec 1994 20:23:58 +0000 (20:23 +0000)
committerTheodore Tso <tytso@mit.edu>
Mon, 19 Dec 1994 20:23:58 +0000 (20:23 +0000)
incorrectly.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4735 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/realm_dom.c

index 41f02136fce3c255e70be9f35ddffea9112b67ab..d4264c2c085a457b9f78c2c7dcf43be57daa1796 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 19 15:20:35 1994  Theodore Y. Ts'o  (tytso@dcl)
+
+       * realm_dom.c (krb5_get_realm_domain): Fixed minor bug where the
+               length of the returned domain was calculated incorrectly.
+
 Mon Oct 31 17:04:08 1994  Theodore Y. Ts'o  (tytso@dcl)
 
        * lock_file.c: Back out POSIX_FILE_LOCKS change.  (Should be
index 83cbaf2adc8640a263061f6e2b6f895f29db7e52..ff6d56d8892c9b83224413ac6f0dd1969d119308 100644 (file)
@@ -107,7 +107,7 @@ krb5_get_realm_domain(realm, domain)
        trans_realm[sizeof(trans_realm)-1] = '\0';
        if (!strcmp(trans_realm, realm)) {
            if (trans_host[0] == '.') {
-               if ((retdomain = malloc(strlen(trans_realm) + 1)) == NULL) {
+               if ((retdomain = malloc(strlen(trans_host) + 1)) == NULL) {
                    if (realmlist != NULL) {
                        krb5_xfree(realmlist[0]);
                        krb5_xfree(realmlist);