From f57289609bdfe5c7063fb32336b1859c37b3c55b Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 5 Nov 2002 03:39:25 +0000 Subject: [PATCH] * pinfo.cc (_pinfo::commune_send): Initialize buffer or suffer random crashes. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/pinfo.cc | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c35a6f6a0..3d09e6abd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2002-11-04 Christopher Faylor + + * pinfo.cc (_pinfo::commune_send): Initialize buffer or suffer random + crashes. + 2002-11-04 Christopher Faylor * fhandler_process.cc (fhandler_process::fill_filebuf): Deal with error diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index b294130d7..0f9510fda 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -328,6 +328,10 @@ _pinfo::commune_send (DWORD code) HANDLE fromme = NULL, tothem = NULL; DWORD nr; commune_result res; + + res.s = NULL; + res.n = 0; + if (!pid || !this) { set_errno (ESRCH);