diff options
author | Christopher Faylor <me@cgf.cx> | 2002-07-03 03:57:05 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-07-03 03:57:05 +0400 |
commit | 5d23017437908b02b99c1041acf229ed6a37289d (patch) | |
tree | 4182e7b036bf4a36e55eaa1d9d9890447b1f50cf /winsup/cygwin/net.cc | |
parent | 0bf10df1efd0ae5a0428e1e61cc7beaf0bea40ad (diff) |
* net.cc (cygwin_getpeername): Defend against NULL pointer dereference.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r-- | winsup/cygwin/net.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index c54dc7eed..870bf7865 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1131,7 +1131,7 @@ cygwin_getpeername (int fd, struct sockaddr *name, int *len) if (fh) res = fh->getpeername (name, len); - syscall_printf ("%d = getpeername %d", res, fh->get_socket ()); + syscall_printf ("%d = getpeername %d", res, (fh ? fh->get_socket () : -1)); return res; } |