From cdbb272b4c5c165e7e1105eef36ce0600c9ea9fb Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 4 May 2011 06:00:54 +0000 Subject: [PATCH] * pinfo.cc (pinfo::pinfo): Set procinfo to NULL to avoid potential cleanup of uninitialized garbage. (Suggested by Ryan Johnson) --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/pinfo.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 + + * pinfo.cc (pinfo::pinfo): Set procinfo to NULL to avoid potential + cleanup of uninitialized garbage. (Suggested by Ryan Johnson) + 2011-05-03 Corinna Vinschen * 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);} -- 2.43.5