aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-11-05 03:39:25 +0000
committerChristopher Faylor <me@cgf.cx>2002-11-05 03:39:25 +0000
commitf57289609bdfe5c7063fb32336b1859c37b3c55b (patch)
tree910aba5fe158a9e7e8076a5d4560365572f14895
parent8948b6585dc2d0d34ddb7a07832b402adcc812a9 (diff)
downloadnewlib-f57289609bdfe5c7063fb32336b1859c37b3c55b.zip
newlib-f57289609bdfe5c7063fb32336b1859c37b3c55b.tar.gz
newlib-f57289609bdfe5c7063fb32336b1859c37b3c55b.tar.bz2
* pinfo.cc (_pinfo::commune_send): Initialize buffer or suffer random crashes.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/pinfo.cc4
2 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c35a6f6..3d09e6a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2002-11-04 Christopher Faylor <cgf@redhat.com>
+ * pinfo.cc (_pinfo::commune_send): Initialize buffer or suffer random
+ crashes.
+
+2002-11-04 Christopher Faylor <cgf@redhat.com>
+
* fhandler_process.cc (fhandler_process::fill_filebuf): Deal with error
condition from cmdline retrieval.
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index b294130..0f9510f 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);