diff options
author | Christopher Faylor <me@cgf.cx> | 2011-05-04 10:00:54 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-05-04 10:00:54 +0400 |
commit | cdbb272b4c5c165e7e1105eef36ce0600c9ea9fb (patch) | |
tree | 3b063c08732232a5a6adcc77e8337cef1b59c9ea | |
parent | 781822a646eb87f01ce47b98dea8fbc7dfc4d177 (diff) |
* pinfo.cc (pinfo::pinfo): Set procinfo to NULL to avoid potential cleanup of
uninitialized garbage. (Suggested by Ryan Johnson)
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/pinfo.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b348b12c8..da31c6224 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-05-04 Christopher Faylor <me.cygwin2011@cgf.cx> + + * pinfo.cc (pinfo::pinfo): Set procinfo to NULL to avoid potential + cleanup of uninitialized garbage. (Suggested by Ryan Johnson) + 2011-05-03 Corinna Vinschen <corinna@vinschen.de> * select.cc (cygwin_select): Make degenerate case cancelable. diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index be6a0b661..b47b59f7f 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -142,7 +142,7 @@ public: bool waiter_ready; class cygthread *wait_thread; void init (pid_t, DWORD, HANDLE) __attribute__ ((regparm(3))); - pinfo () {} + pinfo (): procinfo (NULL) {} pinfo (_pinfo *x): procinfo (x), hProcess (NULL) {} pinfo (pid_t n) : rd_proc_pipe (NULL), hProcess (NULL) {init (n, 0, NULL);} pinfo (pid_t n, DWORD flag) : rd_proc_pipe (NULL), hProcess (NULL), waiter_ready (0), wait_thread (NULL) {init (n, flag, NULL);} |