This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] _pinfo::set_ctty: Check potential NULL pointer in debug_printf statement
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 24 Nov 2016 14:07:07 -0000
- Subject: [newlib-cygwin] _pinfo::set_ctty: Check potential NULL pointer in debug_printf statement
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=59ab07f170d32d09329eaa110c1a90ab534e399a
commit 59ab07f170d32d09329eaa110c1a90ab534e399a
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Thu Nov 24 15:06:51 2016 +0100
_pinfo::set_ctty: Check potential NULL pointer in debug_printf statement
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/pinfo.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 1ce6809..9b74442 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -502,7 +502,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
if (!tc.getpgid () && pgid == pid)
tc.setpgid (pgid);
}
- debug_printf ("cygheap->ctty now %p, archetype %p", cygheap->ctty, fh->archetype);
+ debug_printf ("cygheap->ctty now %p, archetype %p", cygheap->ctty, fh ? fh->archetype : NULL);
return ctty > 0;
}