passed-in profile variable is NULL (instead of core dumping).
prof_err.et (PROF_NO_PROFILE): Defined new error code.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5727
dc483132-0cff-0310-8789-
dd5450dbe970
+Fri May 5 00:02:41 1995 Theodore Y. Ts'o (tytso@dcl)
+
+ * prof_init.c (profile_get_values): Return PROF_NO_PROFILE if the
+ passed-in profile variable is NULL (instead of core dumping).
+
+ * prof_err.et (PROF_NO_PROFILE): Defined new error code.
+
Thu May 4 23:57:56 1995 Theodore Y. Ts'o (tytso@dcl)
* prof_tree.c (profile_free_node): Copy child->next to a scratch
error_code PROF_INVALID_SECTION, "Invalid profile_section object"
error_code PROF_END_OF_SECTIONS, "No more sections"
error_code PROF_BAD_NAMESET, "Bad nameset passed to query routine"
+error_code PROF_NO_PROFILE, "No profile file open"
end
struct string_list values;
const char **cpp;
+ if (profile == 0)
+ return PROF_NO_PROFILE;
+
if (names == 0 || names[0] == 0 || names[1] == 0)
return PROF_BAD_NAMESET;