From 378017d7c29a8620cb761d5aaff38a97d091bdb4 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 22 Sep 2005 17:06:48 +0000 Subject: [PATCH] * strace.cc (strace::vsprntf): Avoid accessing myself->pid if !myself. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/strace.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 63ef597e9..e9018471e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-09-22 Christopher Faylor + + * strace.cc (strace::vsprntf): Avoid accessing myself->pid if !myself. + 2005-09-22 Christopher Faylor * include/sys/strace.h (_STRACE_ON): Remove semicolon from definition. diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc index 38b00f6cb..104be711b 100644 --- a/winsup/cygwin/strace.cc +++ b/winsup/cygwin/strace.cc @@ -149,7 +149,7 @@ strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap) *p = '\000'; p = progname; count = __small_sprintf (buf, fmt, p && *p ? p : "?", - myself->pid ?: GetCurrentProcessId (), + myself ? myself->pid : GetCurrentProcessId (), execing ? "!" : ""); if (func) count += getfunc (buf + count, func); -- 2.43.5