Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-02-11 00:56:22 +0400
committerCorinna Vinschen <corinna@vinschen.de>2012-02-11 00:56:22 +0400
commit793371f584d847db11cfbd9a900cb4bae0f234cf (patch)
tree2bdd36f2bd3dd43d4a0bfc5eb159dff4fd0af38b /winsup/cygwin/uinfo.cc
parentc38a2d83730311cad68d3c2d4759dfc18a3c64f3 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index c1a30c5b0..e0f6e910d 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -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;
}