This commit was manufactured by cvs2svn to create tag
[krb5.git] / src / windows / cns / cns_reg.c
index 400d72d235595776ab4debbab05126f1069c5e57..160eb15e3fc9dd3b38487d9e513faa8731f19456 100644 (file)
@@ -74,8 +74,12 @@ cns_load_registry(void)
   if (key != INVALID_HANDLE_VALUE) {
        if (registry_string_get(key, KERBNET_HOME, &ts) == 0) {
                cns_res.conf_override = 0;
-               strcpy(cns_res.def_confname, ts);
-               strcat(cns_res.def_confname, "\\etc\\krb5.conf");
+               cns_res.def_confname[sizeof(cns_res.def_confname) - 1];
+               strncpy(cns_res.def_confname, ts,
+                       sizeof(cns_res.def_confname) - 1);
+               strncat(cns_res.def_confname, "\\etc\\krb5.conf",
+                       sizeof(cns_res.def_confname) - 1 -
+                       strlen(cns_res.def_confname));
                free(ts);
          }