* net.cc (cygwin_getsockopt): Dereference optlen pointer when passing to

__check_null_invalid_struct_errno.
This commit is contained in:
Christopher Faylor 2001-12-04 22:01:03 +00:00
parent 937b5e4d04
commit 958348a4cf
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-12-04 David Rothenberger <daveroth@acm.org>
* net.cc (cygwin_getsockopt): Dereference optlen pointer when passing
to __check_null_invalid_struct_errno.
2001-12-03 Christopher Faylor <cgf@redhat.com>
* net.cc (cygwin_getsockopt): Allow NULL optval.

View File

@ -799,7 +799,7 @@ cygwin_getsockopt (int fd,
int res = -1;
const char *name = "error";
if (!check_null_invalid_struct_errno (optlen)
&& (!optval || !__check_null_invalid_struct_errno (optval, (unsigned) optlen))
&& (!optval || !__check_null_invalid_struct_errno (optval, (unsigned) *optlen))
&& h)
{
/* For the following debug_printf */