diff options
author | Christopher Faylor <me@cgf.cx> | 2003-09-05 01:55:01 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-09-05 01:55:01 +0000 |
commit | c6f53ff6bedce72a721f71645cd32d2805ba1a3b (patch) | |
tree | 1820cd0e33f4a545a1bf3630b2fe3b898ce76cff /winsup/cygwin/dcrt0.cc | |
parent | cf88c20fd99ca043af3063f2803864c1dd416dd6 (diff) | |
download | cygnal-c6f53ff6bedce72a721f71645cd32d2805ba1a3b.tar.gz cygnal-c6f53ff6bedce72a721f71645cd32d2805ba1a3b.tar.bz2 cygnal-c6f53ff6bedce72a721f71645cd32d2805ba1a3b.zip |
* dcrt0.cc (__argc_safe): New variable.
(dll_crt0_1): Store argc in __argc_safe, which will theoretically remain
untouched by the user.
* fhandler_console.cc (fhandler_console::read): Silence some compiler warnings.
* fhandler_raw.cc (fhandler_dev_raw::raw_read): Ditto.
* pinfo.cc (_pinfo::commune_recv): Carefully bound argv scan and check for
potentially bad pointers since user could have set argv cell to anythinw.
* cygheap.h (CYGHEAPSIZE): Bump up size.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index b4f7bdf5e..635759bb8 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -523,6 +523,7 @@ alloc_stack (child_info_fork *ci) } static NO_COPY int mypid = 0; +int __argc_safe; int _declspec(dllexport) __argc; char _declspec(dllexport) **__argv; vfork_save NO_COPY *main_vfork = NULL; @@ -606,7 +607,7 @@ dll_crt0_1 () DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)) h = NULL; set_myself (mypid, h); - __argc = spawn_info->moreinfo->argc; + __argc = __argc_safe = spawn_info->moreinfo->argc; __argv = spawn_info->moreinfo->argv; envp = spawn_info->moreinfo->envp; envc = spawn_info->moreinfo->envc; |