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:
parent
0bf10df1ef
commit
5d23017437
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user