* miscfuncs.cc (DEFAULT_STACKSIZE): Set to 1 Megs. Drop comment about
RLIMIT_STACK. * registry.cc (get_registry_hive_path): Expect the user hive path to be never longer than MAX_PATH. Don't prepend native NT path prefix here. Add comment. (load_registry_hive): Prepend native NT path prefix here. Additionally try to load user's classes hive. * uinfo.cc (cygheap_user::env_userprofile): Reduce size of userprofile_env_buf to MAX_PATH. Add comment.
This commit is contained in:
@@ -435,12 +435,13 @@ cygheap_user::env_userprofile (const char *name, size_t namelen)
|
||||
if (test_uid (puserprof, name, namelen))
|
||||
return puserprof;
|
||||
|
||||
WCHAR userprofile_env_buf[NT_MAX_PATH];
|
||||
/* User hive path is never longer than MAX_PATH. */
|
||||
WCHAR userprofile_env_buf[MAX_PATH];
|
||||
WCHAR win_id[UNLEN + 1]; /* Large enough for SID */
|
||||
|
||||
cfree_and_set (puserprof, almost_null);
|
||||
if (get_registry_hive_path (get_windows_id (win_id), userprofile_env_buf))
|
||||
sys_wcstombs_alloc (&puserprof, HEAP_STR, userprofile_env_buf + 4);
|
||||
sys_wcstombs_alloc (&puserprof, HEAP_STR, userprofile_env_buf);
|
||||
|
||||
return puserprof;
|
||||
}
|
||||
|
Reference in New Issue
Block a user