4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-31 11:30:56 +08:00

* net.cc (cygwin_getpeername): Defend against NULL pointer dereference.

This commit is contained in:
Christopher Faylor 2002-07-02 23:57:05 +00:00
parent 0bf10df1ef
commit 5d23017437
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-07-02 Christopher Faylor <cgf@redhat.com>
* net.cc (cygwin_getpeername): Defend against NULL pointer dereference.
2002-07-02 Egor Duda <deo@logos-m.ru>
* include/cygwin/version.h: Bump API minor version.

View File

@ -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;
}